[tbb-commits] [tor-browser/tor-browser-78.2.0esr-10.0-1] Revert "Bug 14970: Don't block our unsigned extensions"

gk at torproject.org gk at torproject.org
Wed Sep 9 09:31:08 UTC 2020


commit 8c35e9719ea7dc1d983250558df0732cb78888bf
Author: Alex Catarineu <acat at torproject.org>
Date:   Fri Sep 4 13:48:37 2020 +0200

    Revert "Bug 14970: Don't block our unsigned extensions"
    
    This reverts commit c1e58594c9cf2d226279727e0148ebd59ed98c12.
---
 browser/components/BrowserGlue.jsm                      | 6 +-----
 toolkit/mozapps/extensions/content/aboutaddonsCommon.js | 6 ------
 toolkit/mozapps/extensions/internal/XPIDatabase.jsm     | 5 -----
 toolkit/mozapps/extensions/internal/XPIInstall.jsm      | 1 -
 4 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm
index 0d7de1dc7d4f..ec38d0ca8b33 100644
--- a/browser/components/BrowserGlue.jsm
+++ b/browser/components/BrowserGlue.jsm
@@ -2196,11 +2196,7 @@ BrowserGlue.prototype = {
       );
       AddonManager.getAddonsByIDs(disabledAddons).then(addons => {
         for (let addon of addons) {
-          // We don't need a false notification that our extensions are
-          // disabled. Even if they lack Mozilla's blessing they are enabled
-          // nevertheless.
-          if ((addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) &&
-              (addon.id !== "https-everywhere-eff at eff.org")) {
+          if (addon.signedState <= AddonManager.SIGNEDSTATE_MISSING) {
             this._notifyUnsignedAddonsDisabled();
             break;
           }
diff --git a/toolkit/mozapps/extensions/content/aboutaddonsCommon.js b/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
index a566979bc8c8..9b218c3dae2c 100644
--- a/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
+++ b/toolkit/mozapps/extensions/content/aboutaddonsCommon.js
@@ -214,15 +214,9 @@ var gBrowser = {
   },
 };
 
-// This function is the central check point to decide whether to show a warning
-// about unsigned extensions or not. We want those warnings but only for
-// extensions we don't distribute.
 function isCorrectlySigned(addon) {
   // Add-ons without an "isCorrectlySigned" property are correctly signed as
   // they aren't the correct type for signing.
-  if (addon.id == "https-everywhere-eff at eff.org") {
-    return true;
-  }
   return addon.isCorrectlySigned !== false;
 }
 
diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
index fb9ef83066bf..4d1c469418c5 100644
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
@@ -2207,11 +2207,6 @@ this.XPIDatabase = {
    *        True if the add-on should not be appDisabled
    */
   isUsableAddon(aAddon) {
-    // Ensure that we allow https-everywhere
-    if (aAddon.id == "https-everywhere-eff at eff.org") {
-      return true;
-    }
-
     if (this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
       logger.warn(`Add-on ${aAddon.id} is not correctly signed.`);
       if (Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false)) {
diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.jsm b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
index 5269e2755e58..71034a3e73a7 100644
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -3834,7 +3834,6 @@ var XPIInstall = {
 
     if (
       XPIDatabase.mustSign(addon.type) &&
-      addon.id !== "https-everywhere-eff at eff.org" &&
       addon.signedState <= AddonManager.SIGNEDSTATE_MISSING
     ) {
       throw new Error(





More information about the tbb-commits mailing list