Attachment links from external sources with spaces in their filename redirects to dashboard

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Medium
    • None
    • Affects Version/s: 4.3.5, 4.3.6, 4.3.7, 5.5.2
    • Component/s: None

      Steps to Reproduce

      1. Attach a file that contains spaces in its filename (e.g. "good snippets.txt") to a Confluence page
      2. Copy the attachment's URL in Confluence (should be something like this: http://localhost:8437/download/attachments/65537/good%20snippets.txt?api=v2 )
      3. Paste the link to an Excel document, then try to click on the link in the Excel document

      Notice that the link first goes to http://localhost:8437/login.action?os_destination=%2Fdownload%2Fattachments%2F65537%2Fgood+snippets.txt%3Fapi%3Dv2 , then gets redirected immediately to the dashboard

      Cause

      The space in the attachment is not properly encoded, during the login redirect. Notice that the space is encoded as "+" instead of "%2B". The same behavior is not seen in Confluence 3.5, which has the same login redirect, but in Confluence 3.5, the space is encoded correctly:
      http://localhost:8354/login.action?os_destination=%2Fdownload%2Fattachments%2F65537%2Fgood%2Bsnippets.txt%3Fapi%3Dv2 . Changing it to "+" in Confluence 3.5 results in the same dashboard redirect behavior.

      Note that the login redirect will occur even if you have an active session in the browser. It will not however, prompt you for a username and password if you already have an active session

      Workaround

      Copy the link in Excel, and paste it into the browser's address bar manually - accessing the attachment this way will not get you redirected to the dashboard

            Assignee:
            Steve Haffenden (Inactive)
            Reporter:
            Foo Sim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: