mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-10-08 22:13:34 -04:00
fix: refine/split up patches for handling of extension blocking
Signed-off-by: celenity <celenity@celenity.dev>
This commit is contained in:
3 files changed
+31
-11
No files matched your search
@@ -0,0 +1,17 @@
|
||||
diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
index d7f1cafba23a..f39858ebfe4b 100644
|
||||
--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
@@ -446,7 +446,11 @@ EnterprisePoliciesManager.prototype = {
|
||||
if ("installation_mode" in ExtensionSettings[addon.id]) {
|
||||
switch (ExtensionSettings[addon.id].installation_mode) {
|
||||
case "blocked":
|
||||
- return false;
|
||||
+ if (Services.prefs.getBoolPref("browser.ironfox.extensions.blocklist.enabled") === true) {
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ return true;
|
||||
+ };
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -14,23 +14,19 @@ index afd6d7b6fb49..8021693bdb12 100644
|
||||
setAndLockPref(
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons",
|
||||
diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
index bb451a279599..1caad93eaed5 100644
|
||||
index d7f1cafba23a..a8b7cd405b29 100644
|
||||
--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
@@ -415,11 +415,14 @@ EnterprisePoliciesManager.prototype = {
|
||||
@@ -439,6 +439,12 @@ EnterprisePoliciesManager.prototype = {
|
||||
|
||||
mayInstallAddon(addon) {
|
||||
// See https://dev.chromium.org/administrators/policy-list-3/extension-settings-full
|
||||
- if (!ExtensionSettings) {
|
||||
+ if (!Services.prefs.getBoolPref("browser.ironfox.onboardingCompleted") && addon.id === "uBlock0@raymondhill.net" && addon.type === "extension" && addon.isWebExtension && addon.sourceURI === "https://addons.mozilla.org/firefox/downloads/latest/uBlock0@raymondhill.net/latest.xpi" && addon.name === "uBlock Origin" && addon.isCorrectlySigned && addon.providesUpdatesSecurely && addon.isCompatible && addon.isPlatformCompatible && addon.blocklistState === 0) {
|
||||
return true;
|
||||
}
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (!addon.inDatabase && !Services.prefs.getBoolPref("browser.ironfox.xpinstall.enabled")) {
|
||||
+ return false;
|
||||
+ }
|
||||
if (addon.id in ExtensionSettings) {
|
||||
- if ("installation_mode" in ExtensionSettings[addon.id]) {
|
||||
+ if ("installation_mode" in ExtensionSettings[addon.id] && Services.prefs.getBoolPref("browser.ironfox.extensions.blocklist.enabled")) {
|
||||
switch (ExtensionSettings[addon.id].installation_mode) {
|
||||
case "blocked":
|
||||
return false;
|
||||
if (!ExtensionSettings) {
|
||||
return true;
|
||||
}
|
||||
@@ -914,6 +914,13 @@ patches:
|
||||
effect: "Users can maximize privacy and security by disabling WebGL, without compromising usability, by allowing it to be re-enabled on a per-site basis."
|
||||
category: "User Interface"
|
||||
|
||||
- file: "gecko-ironfox-settings-support-extension-blocklist.patch"
|
||||
name: "IronFox Settings Support (Gecko) - Extension Blocklist"
|
||||
description: "Adds a preference to enable/disable Phoenix's blocklist of malicious/unwanted/sketchy extensions."
|
||||
reason: "To allow users to benefit from this protection, while being able to disable the blocklist if unwanted (at their own risk)."
|
||||
effect: "Users can disable the extension blocklist if desired."
|
||||
category: "User Interface"
|
||||
|
||||
- file: "gecko-ironfox-settings-support-xpinstall.patch"
|
||||
name: "IronFox Settings Support (Gecko) - XPInstall"
|
||||
description: "Provides support for a UI toggle to enable/disable the installation of add-ons."
|
||||
|
||||
Reference in new issue
Block a user