Bug 1530395 - Port bug 377496 to QuantumBar (Improve auth dialog blocking heuristics). r=dao
authorMark Banner <standard8@mozilla.com>
Mon, 25 Feb 2019 17:31:00 +0000
changeset 460945 8e4102596afd16d32bfef539acb909443d29d689
parent 460944 9105b6f8d62c90115989ec0b793f7525b36a2957
child 460946 d59858e71dee882e1975b947037a77aca05d239b
push id35613
push usernerli@mozilla.com
push dateTue, 26 Feb 2019 03:52:35 +0000
treeherdermozilla-central@faec87a80ed1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1530395, 377496
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530395 - Port bug 377496 to QuantumBar (Improve auth dialog blocking heuristics). r=dao Differential Revision: https://phabricator.services.mozilla.com/D21024
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -813,16 +813,24 @@ class UrlbarInput {
     try {
       UrlbarUtils.addToUrlbarHistory(url, this.window);
     } catch (ex) {
       // Things may go wrong when adding url to session history,
       // but don't let that interfere with the loading of the url.
       Cu.reportError(ex);
     }
 
+    // Reset DOS mitigations for the basic auth prompt.
+    // TODO: When bug 1498553 is resolved, we should be able to
+    // remove the !triggeringPrincipal condition here.
+    if (!params.triggeringPrincipal ||
+        params.triggeringPrincipal.isSystemPrincipal) {
+      delete browser.canceledAuthenticationPromptCounter;
+    }
+
     params.allowThirdPartyFixup = true;
 
     if (openUILinkWhere == "current") {
       params.targetBrowser = browser;
       params.indicateErrorPageLoad = true;
       params.allowPinnedTabHostChange = true;
       params.allowPopups = url.startsWith("javascript:");
     } else {