From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../helpers/ProxyPolicies.sys.mjs | 24 ++++++++++++++++++++++ .../helpers/WebsiteFilter.sys.mjs | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'browser/components/enterprisepolicies/helpers') diff --git a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs index 393b9bb85e..80968956ac 100644 --- a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs +++ b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs @@ -29,6 +29,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) { @@ -105,5 +121,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/helpers/WebsiteFilter.sys.mjs b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs index 81f7955f27..26bae7acd9 100644 --- a/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs +++ b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs @@ -130,10 +130,10 @@ export let WebsiteFilter = { } return Ci.nsIContentPolicy.ACCEPT; }, - shouldProcess(contentLocation, loadInfo) { + shouldProcess() { return Ci.nsIContentPolicy.ACCEPT; }, - observe(subject, topic, data) { + observe(subject) { try { let channel = subject.QueryInterface(Ci.nsIHttpChannel); if ( -- cgit v1.2.3