about:neterror's "Go Back" button sometimes has incorrect behaviour
Categories
(Firefox :: Security, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox93 | --- | fixed |
People
(Reporter: nika, Assigned: Gijs)
References
Details
Attachments
(1 file)
STR:
- Open a new tab by middle-clicking on a link to open it in a new tab with no session history, like: https://searchfox.org/
- Enter a URL with an invalid certificate in the URL bar, such as: https://expired.badssl.com/
- Hit the big blue "Go Back" button in the certificate error page.
This will probably not recur on the first try, repeatedly go forward to the error page and hit the "Go Back" button to try again. This is timing sensitive.
Expected: The previous page loads again, as you went back from the expired certificate page.
Actual: The browser navigates to the newtab page, with a history like: https://searchfox.org/ -> https://expired.badssl.com/ -> [about:home]
This is caused in two parts. The forward navigation to the newtab page in the "Go Back" situation is caused by bug 1636836, however the navigation shouldn't have navigated to the newtab page in the first place. This issue was caused by the code in goBackFromErrorPage (https://searchfox.org/mozilla-central/rev/98a9257ca2847fad9a19631ac76199474516b31e/browser/actors/NetErrorParent.jsm#168-183, and https://searchfox.org/mozilla-central/rev/0e8b28fb355afd2fcc69d34e8ed66bbabf59a59a/toolkit/actors/AboutHttpsOnlyErrorParent.jsm#39) using SessionStore's tab state cache to determine if it was possible to go back, which is updated in a delayed manner to save on resources, rather than using canGoBack on the browser.
| Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Comment 3•4 years ago
|
||
| bugherder | ||
Description
•