diff options
Diffstat (limited to 'application/basilisk/base/content')
-rw-r--r-- | application/basilisk/base/content/browser.js | 5 | ||||
-rw-r--r-- | application/basilisk/base/content/browser.xul | 3 | ||||
-rw-r--r-- | application/basilisk/base/content/tab-content.js | 11 | ||||
-rw-r--r-- | application/basilisk/base/content/tabbrowser.xml | 11 | ||||
-rw-r--r-- | application/basilisk/base/content/urlbarBindings.xml | 22 |
5 files changed, 19 insertions, 33 deletions
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js index 9fb997a42..336670fa0 100644 --- a/application/basilisk/base/content/browser.js +++ b/application/basilisk/base/content/browser.js @@ -3094,6 +3094,11 @@ function getWebNavigation() } function BrowserReloadWithFlags(reloadFlags) { + + // Reset DOS mitigation for auth prompts when user initiates a reload. + let browser = gBrowser.selectedBrowser; + delete browser.authPromptCounter; + let url = gBrowser.currentURI.spec; if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) { // If the remoteness has changed, the new browser doesn't have any diff --git a/application/basilisk/base/content/browser.xul b/application/basilisk/base/content/browser.xul index 3208538c1..be64f1bac 100644 --- a/application/basilisk/base/content/browser.xul +++ b/application/basilisk/base/content/browser.xul @@ -997,7 +997,8 @@ contentcontextmenu="contentAreaContextMenu" autocompletepopup="PopupAutoComplete" selectmenulist="ContentSelectDropdown" - datetimepicker="DateTimePickerPanel"/> + datetimepicker="DateTimePickerPanel" + authdosprotected="true" /> </vbox> <vbox id="browser-border-end" hidden="true" layer="true"/> </hbox> diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js index 6d053dd2b..7441b2140 100644 --- a/application/basilisk/base/content/tab-content.js +++ b/application/basilisk/base/content/tab-content.js @@ -9,9 +9,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -#ifdef MOZ_WEBEXTENSIONS -Cu.import("resource://gre/modules/ExtensionContent.jsm"); -#endif XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils", "resource:///modules/E10SUtils.jsm"); @@ -916,14 +913,6 @@ var UserContextIdNotifier = { UserContextIdNotifier.init(); -#ifdef MOZ_WEBEXTENSIONS -ExtensionContent.init(this); -addEventListener("unload", () => { - ExtensionContent.uninit(this); - RefreshBlocker.uninit(); -}); -#endif - addMessageListener("AllowScriptsToClose", () => { content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils) diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 043838020..52c51db69 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -25,7 +25,7 @@ <xul:vbox flex="1" class="browserContainer"> <xul:stack flex="1" class="browserStack" anonid="browserStack"> <xul:browser anonid="initialBrowser" type="content-primary" message="true" messagemanagergroup="browsers" - xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker"/> + xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,selectmenulist,datetimepicker,authdosprotected"/> </xul:stack> </xul:vbox> </xul:hbox> @@ -1936,6 +1936,10 @@ if (this.hasAttribute("datetimepicker")) { b.setAttribute("datetimepicker", this.getAttribute("datetimepicker")); } + + if (this.hasAttribute("authdosprotected")) { + b.setAttribute("authdosprotected", this.getAttribute("authdosprotected")); + } b.setAttribute("autoscrollpopup", this._autoScrollPopup.id); @@ -2991,7 +2995,10 @@ <parameter name="aTab"/> <body> <![CDATA[ - this.getBrowserForTab(aTab).reload(); + let browser = this.getBrowserForTab(aTab); + // Reset DOS mitigation for basic auth prompt + delete browser.authPromptCounter; + browser.reload(); ]]> </body> </method> diff --git a/application/basilisk/base/content/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml index eb3150581..b9c17818a 100644 --- a/application/basilisk/base/content/urlbarBindings.xml +++ b/application/basilisk/base/content/urlbarBindings.xml @@ -56,11 +56,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. <field name="AppConstants" readonly="true"> (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; </field> -#ifdef MOZ_WEBEXTENSIONS - <field name="ExtensionSearchHandler" readonly="true"> - (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler; - </field> -#endif <constructor><![CDATA[ this._prefs = Components.classes["@mozilla.org/preferences-service;1"] @@ -488,15 +483,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. actionDetails ); break; -#ifdef MOZ_WEBEXTENSIONS - case "extension": - this.handleRevert(); - // Give the extension control of handling the command. - let searchString = action.params.content; - let keyword = action.params.keyword; - this.ExtensionSearchHandler.handleInputEntered(keyword, searchString, where); - return; -#endif } } else { // This is a fallback for add-ons and old testing code that directly @@ -554,6 +540,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. Cu.reportError(ex); } + // Reset DOS mitigations for the basic auth prompt. + delete browser.authPromptCounter; + let params = { postData, allowThirdPartyFixup: true, @@ -1214,11 +1203,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. this._clearNoActions(); this.formatValue(); } -#ifdef MOZ_WEBEXTENSIONS - if (ExtensionSearchHandler.hasActiveInputSession()) { - ExtensionSearchHandler.handleInputCancelled(); - } -#endif ]]></handler> <handler event="dragstart" phase="capturing"><![CDATA[ |