summaryrefslogtreecommitdiffstats
path: root/browser/components/enterprisepolicies
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:22:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:22:11 +0000
commit724b36b7051c0d9190cbd8854ba5919904967c11 (patch)
tree8996ac57bf70972bf524e865e0845cd54aab6f6b /browser/components/enterprisepolicies
parentReleasing progress-linux version 115.10.0esr-1~deb12u1progress7u1. (diff)
downloadfirefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.tar.xz
firefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.zip
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/enterprisepolicies')
-rw-r--r--browser/components/enterprisepolicies/Policies.sys.mjs12
-rw-r--r--browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs24
-rw-r--r--browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js12
3 files changed, 42 insertions, 6 deletions
diff --git a/browser/components/enterprisepolicies/Policies.sys.mjs b/browser/components/enterprisepolicies/Policies.sys.mjs
index 8ad1349441..858c5ba7dc 100644
--- a/browser/components/enterprisepolicies/Policies.sys.mjs
+++ b/browser/components/enterprisepolicies/Policies.sys.mjs
@@ -1725,6 +1725,8 @@ export var Policies = {
"places.",
"pref.",
"print.",
+ "privacy.userContext.enabled",
+ "privacy.userContext.ui.enabled",
"signon.",
"spellchecker.",
"toolkit.legacyUserProfileCustomizations.stylesheets",
@@ -1904,13 +1906,11 @@ export var Policies = {
onBeforeAddons(manager, param) {
if (param.Locked) {
manager.disallowFeature("changeProxySettings");
- lazy.ProxyPolicies.configureProxySettings(param, setAndLockPref);
- } else {
- lazy.ProxyPolicies.configureProxySettings(
- param,
- PoliciesUtils.setDefaultPref
- );
}
+ lazy.ProxyPolicies.configureProxySettings(
+ param,
+ PoliciesUtils.setDefaultPref
+ );
},
},
diff --git a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
index 8f2ba0b2a2..148984a055 100644
--- a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
+++ b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
@@ -31,6 +31,22 @@ export var PROXY_TYPES_MAP = new Map([
["autoConfig", Ci.nsIProtocolProxyService.PROXYCONFIG_PAC],
]);
+let proxyPreferences = [
+ "network.proxy.type",
+ "network.proxy.autoconfig_url",
+ "network.proxy.socks_remote_dns",
+ "signon.autologin.proxy",
+ "network.proxy.socks_version",
+ "network.proxy.no_proxies_on",
+ "network.proxy.share_proxy_settings",
+ "network.proxy.http",
+ "network.proxy.http_port",
+ "network.proxy.ssl",
+ "network.proxy.ssl_port",
+ "network.proxy.socks",
+ "network.proxy.socks_port",
+];
+
export var ProxyPolicies = {
configureProxySettings(param, setPref) {
if (param.Mode) {
@@ -107,5 +123,13 @@ export var ProxyPolicies = {
if (param.SOCKSProxy) {
setProxyHostAndPort("socks", param.SOCKSProxy);
}
+
+ // All preferences should be locked regardless of whether or not a
+ // specific value was set.
+ if (param.Locked) {
+ for (let preference of proxyPreferences) {
+ Services.prefs.lockPref(preference);
+ }
+ }
},
};
diff --git a/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js b/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
index 0a8d77d483..1468fcd46c 100644
--- a/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
+++ b/browser/components/enterprisepolicies/tests/xpcshell/test_simple_pref_policies.js
@@ -1034,6 +1034,18 @@ const POLICIES_TESTS = [
"extensions.formautofill.creditCards.enabled": false,
},
},
+
+ // POLICY: Proxy - locking if no values are set
+ {
+ policies: {
+ Proxy: {
+ Locked: true,
+ },
+ },
+ lockedPrefs: {
+ "network.proxy.type": 5,
+ },
+ },
];
add_task(async function test_policy_simple_prefs() {