mozilla-bmo1464766.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Tue, 26 Jun 2018 07:37:04 +0200
branchfirefox60
changeset 1064 af29b3ac33ae
child 1091 cbed5671ff47
permissions -rw-r--r--
do not disable system installed unsigned langpacks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1064
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     1
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     2
# HG changeset patch
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     3
# User Mike Hommey <mh+mozilla@glandium.org>
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     4
# Date 1527491713 -32400
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     5
# Node ID c28becad0c10b906454d7e424f9a9402799ea8dd
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     6
# Parent  a830c8302c71a45e019fe14e16945b32346b2253
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
Bug 1464766 - Allow to relax the addon signature requirements. r?rhelmer
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     9
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    10
--- a/modules/libpref/init/all.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    11
+++ b/modules/libpref/init/all.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    12
@@ -1256,16 +1256,19 @@ pref("print.print_via_parent", true);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    13
 pref("print.print_via_parent", false);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    14
 #endif
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    15
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    16
 // Pref used by the spellchecker extension to control the
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    17
 // maximum number of misspelled words that will be underlined
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    18
 // in a document.
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    19
 pref("extensions.spellcheck.inline.max-misspellings", 500);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    20
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    21
+// Add-on manager scoped allowing unsigned addons. None by default.
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    22
+pref("extensions.unsignedScopes", 12, locked);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    23
+
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    24
 // Prefs used by libeditor. Prefs specific to seamonkey composer
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    25
 // belong in comm-central/editor/ui/composer.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    26
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    27
 pref("editor.use_custom_colors", false);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    28
 pref("editor.singleLine.pasteNewlines",      2);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
 pref("editor.use_css",                       false);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    30
 pref("editor.css.default_length_unit",       "px");
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    31
 pref("editor.resizing.preserve_ratio",       true);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    32
diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    33
--- a/toolkit/mozapps/extensions/content/extensions.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    34
+++ b/toolkit/mozapps/extensions/content/extensions.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    35
@@ -47,16 +47,17 @@ XPCOMUtils.defineLazyPreferenceGetter(th
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    36
 const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    37
 const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
 const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    39
 const PREF_GETADDONS_CACHE_ID_ENABLED = "extensions.%ID%.getAddons.cache.enabled";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    40
 const PREF_UI_TYPE_HIDDEN = "extensions.ui.%TYPE%.hidden";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    41
 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    42
 const PREF_LEGACY_EXCEPTIONS = "extensions.legacy.exceptions";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    43
 const PREF_LEGACY_ENABLED = "extensions.legacy.enabled";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    44
+const PREF_UNSIGNED_SCOPES = "extensions.unsignedScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
 const LOADING_MSG_DELAY = 100;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    48
 const UPDATES_RECENT_TIMESPAN = 2 * 24 * 3600000; // 2 days (in milliseconds)
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    49
 const UPDATES_RELEASENOTES_TRANSFORMFILE = "chrome://mozapps/content/extensions/updateinfo.xsl";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    50
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    51
 const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    52
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
@@ -229,19 +230,21 @@ function loadView(aViewId) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    55
 function isCorrectlySigned(aAddon) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    56
   // Add-ons without an "isCorrectlySigned" property are correctly signed as
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
   // they aren't the correct type for signing.
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
   return aAddon.isCorrectlySigned !== false;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    59
 }
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    61
 function isDisabledUnsigned(addon) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    62
-  let signingRequired = (addon.type == "locale") ?
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    63
-                        AddonSettings.LANGPACKS_REQUIRE_SIGNING :
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    64
-                        AddonSettings.REQUIRE_SIGNING;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    65
+  let unsignedScopes = Services.prefs.getIntPref(PREF_UNSIGNED_SCOPES, 0);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    66
+  let signingRequired = !(addon.scope & unsignedScopes) &&
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    67
+                        ((addon.type == "locale") ?
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    68
+                         AddonSettings.LANGPACKS_REQUIRE_SIGNING :
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    69
+                         AddonSettings.REQUIRE_SIGNING);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    70
   return signingRequired && !isCorrectlySigned(addon);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    71
 }
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    72
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    73
 function isLegacyExtension(addon) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    74
   let legacy = false;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    75
   if (addon.type == "extension" && !addon.isWebExtension) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    76
     legacy = true;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    77
   }
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    78
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    79
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    80
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    81
@@ -66,16 +66,17 @@ const PREF_XPI_STATE                  = 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    82
 const PREF_BLOCKLIST_ITEM_URL         = "extensions.blocklist.itemURL";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    83
 const PREF_BOOTSTRAP_ADDONS           = "extensions.bootstrappedAddons";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    84
 const PREF_PENDING_OPERATIONS         = "extensions.pendingOperations";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    85
 const PREF_SKIN_SWITCHPENDING         = "extensions.dss.switchPending";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    86
 const PREF_SKIN_TO_SELECT             = "extensions.lastSelectedSkin";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    87
 const PREF_GENERAL_SKINS_SELECTEDSKIN = "general.skins.selectedSkin";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    88
 const PREF_EM_EXTENSION_FORMAT        = "extensions.";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    89
 const PREF_EM_ENABLED_SCOPES          = "extensions.enabledScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    90
+const PREF_EM_UNSIGNED_SCOPES         = "extensions.unsignedScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    91
 const PREF_EM_STARTUP_SCAN_SCOPES     = "extensions.startupScanScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    92
 const PREF_EM_SHOW_MISMATCH_UI        = "extensions.showMismatchUI";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    93
 const PREF_XPI_ENABLED                = "xpinstall.enabled";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    94
 const PREF_XPI_WHITELIST_REQUIRED     = "xpinstall.whitelist.required";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    95
 const PREF_XPI_DIRECT_WHITELISTED     = "xpinstall.whitelist.directRequest";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    96
 const PREF_XPI_FILE_WHITELISTED       = "xpinstall.whitelist.fileRequest";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    97
 // xpinstall.signatures.required only supported in dev builds
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    98
 const PREF_XPI_SIGNATURES_REQUIRED    = "xpinstall.signatures.required";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    99
@@ -801,17 +802,19 @@ function isDisabledLegacy(addon) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   100
  *         The add-on to check
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   101
  * @return true if the add-on should not be appDisabled
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   102
  */
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   103
 function isUsableAddon(aAddon) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   104
   // Hack to ensure the default theme is always usable
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   105
   if (aAddon.type == "theme" && aAddon.internalName == XPIProvider.defaultSkin)
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   106
     return true;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   107
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   108
-  if (mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   109
+  let unsignedScopes = Services.prefs.getIntPref(PREF_EM_UNSIGNED_SCOPES, 0);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   110
+  if (!(aAddon._installLocation.scope & unsignedScopes) &&
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   111
+      mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   112
     logger.warn(`Add-on ${aAddon.id} is not correctly signed.`);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   113
     if (Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false)) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   114
       logger.warn(`Preference ${PREF_XPI_SIGNATURES_DEV_ROOT} is set.`);
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   115
     }
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   116
     return false;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   117
   }
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   118
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   119
   if (aAddon.blocklistState == nsIBlocklistService.STATE_BLOCKED) {
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   120
diff --git a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   121
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   122
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   123
@@ -39,16 +39,17 @@ var logger = Log.repository.getLogger(LO
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   124
 const KEY_PROFILEDIR                  = "ProfD";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   125
 const FILE_JSON_DB                    = "extensions.json";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   126
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   127
 // The last version of DB_SCHEMA implemented in SQLITE
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   128
 const LAST_SQLITE_DB_SCHEMA           = 14;
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   129
 const PREF_DB_SCHEMA                  = "extensions.databaseSchema";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   130
 const PREF_PENDING_OPERATIONS         = "extensions.pendingOperations";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   131
 const PREF_EM_AUTO_DISABLED_SCOPES    = "extensions.autoDisableScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   132
+const PREF_EM_UNSIGNED_SCOPES         = "extensions.unsignedScopes";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   133
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   134
 const KEY_APP_SYSTEM_ADDONS           = "app-system-addons";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   135
 const KEY_APP_SYSTEM_DEFAULTS         = "app-system-defaults";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   136
 const KEY_APP_GLOBAL                  = "app-global";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   137
 const KEY_APP_TEMPORARY               = "app-temporary";
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   138
 
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   139
 // Properties to save in JSON file
af29b3ac33ae do not disable system installed unsigned langpacks
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   140
 const PROP_JSON_FIELDS = ["id", "syncGUID", "location", "version", "type",