blob: 7a41e79def1ed505422f175c5878799b95bdcbde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From: Mike Hommey <mh@glandium.org>
Date: Sat, 5 Dec 2015 18:23:58 +0900
Subject: Allow unsigned addons in /usr/{lib,share}/mozilla/extensions
See rhbz#1293874
---
toolkit/mozapps/extensions/content/extensions.js | 2 ++
toolkit/mozapps/extensions/internal/XPIProvider.jsm | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
index 8625097..9152096 100644
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -211,6 +211,8 @@ function isCorrectlySigned(aAddon) {
// temporary add-ons do not require signing
if (aAddon.scope == AddonManager.SCOPE_TEMPORARY)
return true;
+ if (aAddon.scope == AddonManager.SCOPE_SYSTEM)
+ return true;
if (aAddon.signedState <= AddonManager.SIGNEDSTATE_MISSING)
return false;
if (aAddon.foreignInstall && aAddon.signedState < AddonManager.SIGNEDSTATE_SIGNED)
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 343c087..de62d8a 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -682,7 +682,8 @@ function isUsableAddon(aAddon) {
return false;
}
// temporary and system add-ons do not require signing
- if ((aAddon._installLocation.name != KEY_APP_SYSTEM_DEFAULTS &&
+ if ((aAddon._installLocation.scope != AddonManager.SCOPE_SYSTEM &&
+ aAddon._installLocation.name != KEY_APP_SYSTEM_DEFAULTS &&
aAddon._installLocation.name != KEY_APP_TEMPORARY) &&
mustSign(aAddon.type)) {
if (aAddon.signedState <= AddonManager.SIGNEDSTATE_MISSING)
|