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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • 4.3.5, 4.3.6, 4.3.7, 5.5.2
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: