Bug 1454141 - Require language packs to be signed. r=kmag, a=jcristau
authorAndrew Swan <aswan@mozilla.com>
Fri, 20 Apr 2018 13:01:51 -0700
changeset 802199 4df35eb4d62e1711090ec0e9538c25a413798108
parent 802198 62bc8ca444f93c09e9e87c4910a7910596f8010e
child 802200 65d0f71da240e915e2f120a31c790158a535333d
push id111850
push userbmo:tom@mozilla.com
push dateThu, 31 May 2018 16:41:37 +0000
reviewerskmag, jcristau
bugs1454141
milestone60.0.2
Bug 1454141 - Require language packs to be signed. r=kmag, a=jcristau MozReview-Commit-ID: 5yDmkb6GJht
browser/app/profile/firefox.js
mobile/android/app/mobile.js
toolkit/mozapps/extensions/internal/AddonSettings.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -81,16 +81,17 @@ pref("extensions.webextensions.remote", 
 #elif defined(XP_MACOSX) && !defined(RELEASE_OR_BETA)
 pref("extensions.webextensions.remote", true);
 #endif
 
 // Extensions that should not be flagged as legacy in about:addons
 pref("extensions.legacy.exceptions", "{972ce4c6-7e08-4474-a285-3208198ce6fd},testpilot@cliqz.com,@testpilot-containers,jid1-NeEaf3sAHdKHPA@jetpack,@activity-streams,pulse@mozilla.com,@testpilot-addon,@min-vid,tabcentertest1@mozilla.com,snoozetabs@mozilla.com,speaktome@mozilla.com,hoverpad@mozilla.com");
 
 // Require signed add-ons by default
+pref("extensions.langpacks.signatures.required", true);
 pref("xpinstall.signatures.required", true);
 pref("xpinstall.signatures.devInfoURL", "https://wiki.mozilla.org/Addons/Extension_Signing");
 
 // Dictionary download preference
 pref("browser.dictionaries.download.url", "https://addons.mozilla.org/%LOCALE%/firefox/dictionaries/");
 
 // At startup, should we check to see if the installation
 // date is older than some threshold
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -183,16 +183,17 @@ pref("dom.forms.datetime", true);
 pref("dom.forms.datetime.others", true);
 pref("dom.forms.number", true);
 
 /* extension manager and xpinstall */
 pref("xpinstall.whitelist.directRequest", false);
 pref("xpinstall.whitelist.fileRequest", false);
 pref("xpinstall.whitelist.add", "https://addons.mozilla.org,https://testpilot.firefox.com");
 
+pref("extensions.langpacks.signatures.required", true);
 pref("xpinstall.signatures.required", true);
 
 pref("extensions.enabledScopes", 1);
 pref("extensions.autoupdate.enabled", true);
 pref("extensions.autoupdate.interval", 86400);
 pref("extensions.update.enabled", true);
 pref("extensions.update.interval", 86400);
 pref("extensions.dss.enabled", false);
--- a/toolkit/mozapps/extensions/internal/AddonSettings.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonSettings.jsm
@@ -25,22 +25,22 @@ function makeConstant(name, value) {
     value,
   });
 }
 
 makeConstant("ADDON_SIGNING", AppConstants.MOZ_ADDON_SIGNING);
 
 if (AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {
   makeConstant("REQUIRE_SIGNING", true);
+  makeConstant("LANGPACKS_REQUIRE_SIGNING", true);
 } else {
   XPCOMUtils.defineLazyPreferenceGetter(AddonSettings, "REQUIRE_SIGNING",
                                         PREF_SIGNATURES_REQUIRED, false);
+  XPCOMUtils.defineLazyPreferenceGetter(AddonSettings, "LANGPACKS_REQUIRE_SIGNING",
+                                        PREF_LANGPACK_SIGNATURES, false);
 }
 
-XPCOMUtils.defineLazyPreferenceGetter(AddonSettings, "LANGPACKS_REQUIRE_SIGNING",
-                                      PREF_LANGPACK_SIGNATURES, false);
-
 if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS || Cu.isInAutomation) {
   XPCOMUtils.defineLazyPreferenceGetter(AddonSettings, "ALLOW_LEGACY_EXTENSIONS",
                                         PREF_ALLOW_LEGACY, true);
 } else {
   makeConstant("ALLOW_LEGACY_EXTENSIONS", false);
 }