Closed Bug 1743148 Opened 4 years ago Closed 4 years ago

Clicking the button to open the login page in the captive portal error page UI opens the login page in every open window

Categories

(Firefox :: Security, defect, P1)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- fixed
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- fixed

People

(Reporter: nhnt11, Assigned: nhnt11)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

So we're firing an observer notification here: https://searchfox.org/mozilla-central/rev/65d4d3399afa79c8de5a0cc11752d2ba7c31edc1/browser/actors/NetErrorParent.jsm#279

This results in every CaptivePortalWatcher instance - that is, every open window - receiving the obs notification and opening a login page tab.

This might be the same or similar issue seen in a number of other captive portal bugs, I'm not sure... but we can dupe those as necessary when we revisit them.

Regressed by: 1544610
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1544610

Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f03fa07c78df Call ensureCaptivePortalTab() directly from NetErrorParent instead of firing an obs notification. r=lyavor,valentin

Backed out for causing failures on browser_captivePortal_certErrorUI.js.

Backout link: https://hg.mozilla.org/integration/autoland/rev/57f84252a7f882ea7715ec913f6f7e337f2dec71

Push with failures : https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=f03fa07c78df83390982a1023e0569b9fff00222&selectedTaskRun=U1EO4zzFRha4vAJke-G33g.0

Link to failures log:
https://treeherder.mozilla.org/logviewer?job_id=360116266&repo=autoland&lineNumber=3223
https://treeherder.mozilla.org/logviewer?job_id=360114920&repo=autoland&lineNumber=3788

Failure message :
TEST-UNEXPECTED-FAIL | browser/base/content/test/captivePortal/browser_captivePortal_certErrorUI.js | leaked 1 window(s) until shutdown [url = chrome://browser/content/browser.xhtml]

Flags: needinfo?(nhnt11)

The issue is that the second task in the file was not clearing the captive portal state at the end, which interfered with the newly opened window in the first task on subsequent runs in test-verify. Pushing a fix.

Flags: needinfo?(nhnt11)
Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dbd90d486efd Call ensureCaptivePortalTab() directly from NetErrorParent instead of firing an obs notification. r=lyavor,valentin

Okay, it's the same failure, just that the other test that ran before it is the one that is creating the issue by not clearing captive portal state. Here's a try push this time: https://treeherder.mozilla.org/jobs?repo=try&revision=78150f14d10b914807326799243d24c814b56052

Flags: needinfo?(nhnt11)
Pushed by nhnt11@gmail.com: https://hg.mozilla.org/integration/autoland/rev/86b6d2b1fe7f Call ensureCaptivePortalTab() directly from NetErrorParent instead of firing an obs notification. r=lyavor,valentin
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Flags: in-testsuite+
See Also: → 1738737

This seems worth backporting to ESR and grafts cleanly. Please nominate for approval if you agree.

No longer blocks: 1544610
Flags: needinfo?(nhnt11)

Comment on attachment 9252656 [details]
Bug 1743148 - Call ensureCaptivePortalTab() directly from NetErrorParent instead of firing an obs notification. r=valentin!,lyavor

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a simple fix that results in a significant quality of life improvement for users who encounter the bug. It grafts cleanly and is covered by tests.
  • User impact if declined: When behind a captive portal, attempting to open the login page via the button in the captive portal error page will open the login page in a new tab in all open windows instead of just the active one. This is a hassle to clean up for users with multiple windows.
  • Fix Landed on Version: 96
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): Not a trivial CSS change. Otherwise very simple and covered by tests - hence medium.
  • String or UUID changes made by this patch:
Flags: needinfo?(nhnt11)
Attachment #9252656 - Flags: approval-mozilla-esr91?

Comment on attachment 9252656 [details]
Bug 1743148 - Call ensureCaptivePortalTab() directly from NetErrorParent instead of firing an obs notification. r=valentin!,lyavor

Approved for 91.5esr.

Attachment #9252656 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: