Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-13763

Moving attachments may silently fail to move the actual file

    XMLWordPrintable

Details

    Description

      In com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.moveAttachment(Attachment, Attachment, ContentEntityObject) we use com.atlassian.core.util.FileUtils.moveDir(File, File) to move the attachments to the new destination. But we never check the return value of moveDir() which may result in the metadata being updated but the file not being moved.
      We should throw an exception if the file couldn't be successfully moved, to rollback any changes to the attachment metadata.

      Attachments

        Issue Links

          Activity

            People

              rthomas@atlassian.com RyanA
              ckiehl Chris Kiehl
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: