From 6bb02d95f70000b150569089987701c8244d7d5d Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 13 Feb 2019 11:50:04 +0100 Subject: Remove webextensions conditional code from Basilisk. Tag issue #936 --- application/basilisk/base/content/tab-content.js | 11 ----------- application/basilisk/base/content/urlbarBindings.xml | 19 ------------------- 2 files changed, 30 deletions(-) (limited to 'application/basilisk/base') 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/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml index eb3150581..ad11f7fdf 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/. (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; -#ifdef MOZ_WEBEXTENSIONS - - (Components.utils.import("resource://gre/modules/ExtensionSearchHandler.jsm", {})).ExtensionSearchHandler; - -#endif Date: Wed, 13 Feb 2019 19:11:37 +0100 Subject: Remove WebExtension support from the platform. - Conditional code - WE APIs - WE toolkit theming --- application/basilisk/base/jar.mn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/basilisk/base') diff --git a/application/basilisk/base/jar.mn b/application/basilisk/base/jar.mn index c288685b9..ddfb0ffe8 100644 --- a/application/basilisk/base/jar.mn +++ b/application/basilisk/base/jar.mn @@ -95,7 +95,7 @@ browser.jar: #endif content/browser/browser-thumbnails.js (content/browser-thumbnails.js) content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js) -* content/browser/tab-content.js (content/tab-content.js) + content/browser/tab-content.js (content/tab-content.js) content/browser/content.js (content/content.js) content/browser/defaultthemes/1.footer.jpg (content/defaultthemes/1.footer.jpg) content/browser/defaultthemes/1.header.jpg (content/defaultthemes/1.header.jpg) @@ -163,7 +163,7 @@ browser.jar: content/browser/contentSearchUI.css (content/contentSearchUI.css) content/browser/tabbrowser.css (content/tabbrowser.css) content/browser/tabbrowser.xml (content/tabbrowser.xml) -* content/browser/urlbarBindings.xml (content/urlbarBindings.xml) + content/browser/urlbarBindings.xml (content/urlbarBindings.xml) content/browser/utilityOverlay.js (content/utilityOverlay.js) content/browser/usercontext.svg (content/usercontext.svg) content/browser/web-panels.js (content/web-panels.js) -- cgit v1.2.3 From f227feb6efbfa61c62cba88ab85df3c650311560 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 28 Feb 2019 14:16:09 +0100 Subject: Update Basilisk FE code with HTTP Auth DoS protection. --- application/basilisk/base/content/browser.js | 5 +++++ application/basilisk/base/content/tabbrowser.xml | 5 ++++- application/basilisk/base/content/urlbarBindings.xml | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'application/basilisk/base') 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/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 043838020..c84c333c4 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -2991,7 +2991,10 @@ diff --git a/application/basilisk/base/content/urlbarBindings.xml b/application/basilisk/base/content/urlbarBindings.xml index ad11f7fdf..b9c17818a 100644 --- a/application/basilisk/base/content/urlbarBindings.xml +++ b/application/basilisk/base/content/urlbarBindings.xml @@ -540,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, -- cgit v1.2.3 From c1ece93c2be6fb571a013f9735dc629d7279f389 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 1 Mar 2019 14:01:09 +0100 Subject: Make the Auth prompt DOS protection a browser-element opt-in feature. --- application/basilisk/base/content/browser.xul | 3 ++- application/basilisk/base/content/tabbrowser.xml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'application/basilisk/base') 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" />