Details
-
Bug
-
Resolution: Fixed
-
Low
-
5.7.3, 5.8.4
-
None
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
- Create a new user. (i.e. "test@example.com")
- Login as "test@example.com".
- Create a personal space.
- 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. - Upload and insert an attachment (pdf, jpg, png, and etc).
- Click the attachment for preview (notice that the URL has been stripped of page context)
- Hit the "Back" button in the browser
Scenario 2
- Create a test page with '@' symbol. (i.e. @Test)
- Upload and insert an attachment (pdf, jpg, png, and etc).
- Click the attachment for preview (notice that the URL has been stripped of page context)
- 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
- Preview the attachment using the URL that contains a page ID. (i.e. http://base-url/pages/viewpage.action?pageId=1179674)
- 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.