Closed Bug 1711756 Opened 6 months ago Closed 3 months ago

about:neterror's "Go Back" button sometimes has incorrect behaviour

Categories

(Firefox :: Security, defect)

defect

Tracking

()

RESOLVED FIXED
93 Branch
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: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Blocks: 1221084
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/08efaac74b5d
fix 'go back' button in network error page to work more reliably and not rely on session restore, r=nika
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.