There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-2ab038a3-8a5c-4f87-a4b0-393437e1a6e7 XWIKI-25275 Open

Attachments stored in the S3 blob store are truncated when a page is deleted or exported as XAR

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-ea576ce2-a6db-43f8-a3c9-b34e15f5bc3c Claude on 12/Oct/26 17:22
 

Additional details on the scope:

  • All the code paths that serialize an attachment content through XAROutputFilterStream are affected: the page recycle bin (with the default file store and with the hibernate store), the attachment recycle bin when it uses the hibernate content store (xwiki.store.attachment.recyclebin.content.hint=hibernate, HibernateDeletedAttachmentContent), the XAR export, and XWikiDocument#toXML / XWikiAttachment#toXML with the attachment content. Deleted attachments are not affected with the default file attachment recycle bin content store, which copies the content to the end of the stream.
  • Only attachments whose content stream returns a short read are truncated: in practice the attachments larger than a few KB stored in the S3 blob store (the 4096-byte attachments of the test were intact).
  • The fix cannot repair what was already written: recycle bin entries created before the fix keep their truncated attachments (the attachment content of a deleted page is removed with the page), so restoring such an entry after upgrading still gives truncated attachments.