Commit 52c26fbf authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1525357 - Don't allow third party installs if xpinstall disabled by policy. r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D18727

--HG--
extra : moz-landing-system : lando
parent e3b61caa
......@@ -674,6 +674,7 @@ var Policies = {
setAndLockPref("xpinstall.enabled", param.Default);
if (!param.Default) {
blockAboutPage(manager, "about:debugging");
manager.disallowFeature("xpinstall");
}
}
},
......
......@@ -2337,6 +2337,12 @@ this.XPIDatabaseReconcile = {
// Load the manifest if necessary and sanity check the add-on ID
let unsigned;
try {
// Do not allow third party installs if xpinstall is disabled by policy
if (isDetectedInstall && Services.policies &&
!Services.policies.isAllowed("xpinstall")) {
throw new Error("Extension installs are disabled by enterprise policy.");
}
if (!aNewAddon) {
// Load the manifest from the add-on.
let file = new nsIFile(aAddonState.path);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment