From 5936ccc54936049dd47810558ca132120b515215 Mon Sep 17 00:00:00 2001 From: Andrew Swan Date: Fri, 20 Apr 2018 13:01:51 -0700 Subject: [PATCH] Bug 1454141 Require language packs to be signed MozReview-Commit-ID: 5yDmkb6GJht --HG-- extra : rebase_source : 9220d629ecabf9ae8f58845f242f5a8a3cecfecb --- browser/app/profile/firefox.js | 1 + mobile/android/app/mobile.js | 1 + toolkit/mozapps/extensions/internal/AddonSettings.jsm | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 2c316ed15ebf..dbf8675e4328 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -84,6 +84,7 @@ pref("extensions.webextensions.remote", true); 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"); diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 50bfc6359d5d..e23d79d2ffbd 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -187,6 +187,7 @@ 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); diff --git a/toolkit/mozapps/extensions/internal/AddonSettings.jsm b/toolkit/mozapps/extensions/internal/AddonSettings.jsm index a3a162c4ff15..032e1f2565ef 100644 --- a/toolkit/mozapps/extensions/internal/AddonSettings.jsm +++ b/toolkit/mozapps/extensions/internal/AddonSettings.jsm @@ -30,14 +30,14 @@ 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);