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

AttachmentManager.getPreviousVersions sometimes returns current version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.9.6
    • Standalone.

      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

    Description

      I discovered a situation where a cal to AttachmentManager.getPreviousVersions(Attachment) returned all prior versions but also returned the prior version twice and also the current version.

      In this example it returned versions: 43 - 67 then 67 again and 68. The current version was 68.

      In this example I actually had a plugin that deleted these versions, it makes a call to getPreviousVersions and deletes (some of) them.

      As a result, a call to AttachmentManager.removeAttachmentVersionFromServer(Attachment) actually allowed the deletion of the current version.

      Even though this current version was deleted from the server, the version still appears against the page, attempts to view the attachment result in Attachment File Not Found being displayed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            6c4fdac73624 Brett Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: