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)
-
1
-
Severity 3 - Minor
-
0
-
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.