Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7835

Webdav uploading an attachment with + character in filename fails leaving duplicate attachments in hibernate session.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.2-milestone-1
    • 3.5
    • Old Core
    • None
    • Tomcat 7
    • webdav upload error rename
    • Unknown
    • N/A

    Description

      There seems to be a problem after uploading an image "cabin+2-[rw].jpg]" via webdav (BitKinex client)

      The webdav client seems to try to list the file being uploaded after the PUT is finished.

      It fails its own integrity check, because that exact file name isn't found.
      It then re-uploads the same file 30 times then gives up.

      This leads to the image actually uploading and there only being one entry in the xwikiattachment table, but 31 copies displayed in the #attachments section of the page.

      It also leaves me unable to re-name the file in the webdav client, or delete the attachment via the page's attachment section.

      Restarting Tomcat seemed to clear the hibernate session and allowed me to delete the attachment from the page's attachment section.

      If I upload the same file via the regular web browser way this problem doesn't seem to happen, although in the xwa_filename column the file seems to upload as "cabin 2-[rw].jpg]" instead of "cabin+2-[rw].jpg]".

      Delete on rename!
      Also, via webdav if I upload the file as "cabin-2-[rw].jpg]" then rename to "cabin+2-[rw].jpg]" the attachment is deleted from the database table, and from the filesystem attachment store.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              jamiem Jamie Maher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: