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

Page URL with '@' Symbol Strips Page Context when Attachment is Previewed

    XMLWordPrintable

Details

    Description

      Problem summary

      Confluence page URL (with '@' symbol) strips all page context with an an attachment is previewed, leading to problems when exiting attachment preview mode.

      Steps to reproduce

      Scenario 1
      1. Create a new user. (i.e. "test@example.com")
      2. Login as "test@example.com".
      3. Create a personal space.
      4. Create a test page.
        Please make sure that the page URL renders as http://base-url/display/~test@example.com/Test. This issue does not affect page URL such as http://base-url/pages/viewpage.action?pageId=1179674 as it does not contain '@' symbol.
      5. Upload and insert an attachment (pdf, jpg, png, and etc).
      6. Click the attachment for preview (notice that the URL has been stripped of page context)
      7. Hit the "Back" button in the browser
      Scenario 2
      1. Create a test page with '@' symbol. (i.e. @Test)
      2. Upload and insert an attachment (pdf, jpg, png, and etc).
      3. Click the attachment for preview (notice that the URL has been stripped of page context)
      4. Hit the "Back" button in the browser

      Expected behavior

      After hitting "Back", the user is brought back to the original page

      Actual behavior

      After hitting "Back", the user is brought back to the root of the hostname. This may be the base URL of Confluence, or it may be an invalid path if Confluence normally runs with a context path appended to the hostname.

      Workarounds

      • Instead of hitting "Back", simply click out of the preview pane by clicking outside the image or clicking the X on the upper right
      • Replace the '@' character with an ASCII code equivalent when viewing the page, i.e. '%40'. (e.g. http://base-url/display/~test%40example.com/Test). It may be possible to do this automatically via a front-end network device such as a proxy, to replace @ with %40 automatically in the URL

      A note on impact

      The impact of this issue is especially disruptive for environments that utilize email addresses for usernames, in which case every personal space would contain the '@' character in the space key.

      Reference

      URL-Change.mp4

      Attachments

        Issue Links

          Activity

            People

              ple Phong Quoc Le (Inactive)
              kyong Kok Yan Yong (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: