Closed Bug 1824218 Opened 2 years ago Closed 9 months ago

Captive portal login tab does not get closed automatically

Categories

(Firefox :: General, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: salemserein1, Assigned: valentin)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0

Steps to reproduce:

Connecting to my Wifi requires a password. And every time I connect, the verification page (see the link : https://support.mozilla.org/fr/kb/portail-captif) opens automatically. This becomes annoying. I would like to be able to connect to my wifi without this page opening systematically.

Actual results:

the verification page (see the link : https://support.mozilla.org/fr/kb/portail-captif) opens automatically. This becomes annoying.

Expected results:

I would like to be able to connect to my wifi without this page opening systematically.

Hello,
thank you for bringing up this issue.

If you haven't already, you can try setting network.captive-portal-service.enabled as false:

  1. In the address bar, paste about:config and press Enter.
  2. Press Enter again or click the button accepting the risk.
  3. Use the page search field to find network.captive-portal-service.enabled
  4. Prese the Toggle button to set it "false".
    Source: https://support.mozilla.org/bm/questions/1313639

Please let me know if this helps!

Flags: needinfo?(salemserein1)

The Bugbug bot thinks this bug should belong to the 'Toolkit::Password Manager' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Password Manager
Product: Firefox → Toolkit

Redirect a needinfo that is pending on an inactive user to the triage owner.
:serg, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit BugBot documentation.

Flags: needinfo?(salemserein1) → needinfo?(sgalich)
Component: Password Manager → Networking
Flags: needinfo?(sgalich)
Product: Toolkit → Core
Version: Firefox 111 → unspecified

I am not familiar with captive portal service, but it seems like it could be a useful feature to prevent the showing of the captive portal page for regularly used captive portal networks.

Valentin, just want to check that:

  1. the reported behavior is expected and not a "bug"
  2. we don't already have some way to do this

Thanks

Severity: -- → N/A
Flags: needinfo?(valentin.gosu)
Priority: -- → P3

So, what should normally happen is that the we open the login page, the user logs into the captive portal, then we close the page after a successful login.
The code that's supposed to do that is:

https://searchfox.org/mozilla-central/rev/6b8a3f804789fb865f42af54e9d2fef9dd3ec74d/browser/base/content/browser-captivePortal.js#142-150

let canonicalURI = Services.io.newURI(this.canonicalURL);
if (
  tab &&
  tab.linkedBrowser.currentURI.equalsExceptRef(canonicalURI) &&
  (this._cps.state == this._cps.UNLOCKED_PORTAL ||
    this._cps.state == this._cps.UNKNOWN)
) {
  gBrowser.removeTab(tab);
}

However, in bug 1433500 we made the canonical URI be a meta refresh to a SUMO page.
So after a successful login, we now race between the meta refresh to https://support.mozilla.org and closing the tab - so we might not end up closing the tab, so it stays on the SUMO page, telling users to file a bug.

Assignee: nobody → valentin.gosu
Status: UNCONFIRMED → ASSIGNED
Component: Networking → General
Ever confirmed: true
Flags: needinfo?(valentin.gosu)
Product: Core → Firefox
Summary: https://support.mozilla.org/fr/kb/portail-captif → Captive portal login tab does not get closed automatically
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/29b472f03f87 Close captive portal page even if it navigated to support.mozilla.org r=mconley
Regressions: 1879652
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: