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

Accessing edit/remove attachment URL containing a filename with German Umlauts throws NullPointerException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Low
    • None
    • 3.1, 3.2
    • None

    Description

      Attaching a File with German Umlauts (e.g. ü, ä or ö) or French accented letters (é, â, ç, etc) in its filename breaks the edit and remove actions on that attachment.

      We have two confluence instances, one is confluence-3.2 with MS SQL server, the other one is confluence-3.1 with MySQL. Both run on tomcat 6.0.18 on 32bit debian. It happens on both instances; we pass the encoding test (admin/encodingtest.action) on both confluence instances.

      Steps to reproduce

      • Attach a file with filename e.g. "test_ä_test.png" to a page
      • Try to edit or remove the file

      Actual results

      • The file cannot be edited or removed; NullPointerException at at com.atlassian.confluence.pages.actions.MoveAttachmentAction.bootstrap(MoveAttachmentAction.java:115); Stacktrace is attached
      • Viewing the file works

      Expected results

      Editing or removing those attachments can be done without fiddling around with the URL

      Workaround

      The link to editattachment.action and removeattachment.action contains the URL escaped filename:
      http://CONFLUENCE_HOST/confluence/pages/editattachment.action?pageId=3997707&fileName=test_%C3%A4_test.png
      http://CONFLUENCE_HOST/confluence/pages/removeattachment.action?pageId=3997707&fileName=test_%C3%A4_test.png&version=1

      If you call the URL without escaping the umlaut like this:
      http://CONFLUENCE_HOST/confluence/pages/editattachment.action?pageId=3997707&fileName=test_ä_test.png
      http://CONFLUENCE_HOST/confluence/pages/removeattachment.action?pageId=3997707&fileName=test_ä_test.png&version=1
      the attachment can be edited or removed.

      Thank you for your help,
      Ferdinand

      Attachments

        Activity

          People

            dkjellin Daniel
            9fc5f72471a9 Ferdinand Hübner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: