[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] branch tor-browser-102.2.0esr-12.0-3 updated: Bug 41125: stop proxy bypass in ServiceRequest.fetch by gating with checking MOZ_PROXY_BYPASS_PROTECTION and network.proxy.allow_bypass



This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-102.2.0esr-12.0-3
in repository tor-browser.

The following commit(s) were added to refs/heads/tor-browser-102.2.0esr-12.0-3 by this push:
     new 22b494ed36131 Bug 41125: stop proxy bypass in ServiceRequest.fetch by gating with checking MOZ_PROXY_BYPASS_PROTECTION and network.proxy.allow_bypass
22b494ed36131 is described below

commit 22b494ed36131f2195cae9b11fc0772cf2b500e9
Author: Dan Ballard <dan@xxxxxxxxxxxx>
AuthorDate: Tue Sep 6 11:34:24 2022 -0700

    Bug 41125: stop proxy bypass in ServiceRequest.fetch by gating with checking MOZ_PROXY_BYPASS_PROTECTION and network.proxy.allow_bypass
---
 services/settings/Utils.jsm      | 3 +++
 toolkit/modules/AppConstants.jsm | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm
index 31ad77d28678a..bab0e078ea14e 100644
--- a/services/settings/Utils.jsm
+++ b/services/settings/Utils.jsm
@@ -220,6 +220,9 @@ var Utils = {
       function fallbackOrReject(err) {
         if (
           // At most one recursive Utils.fetch call (bypassProxy=false to true).
+          // if allowed by network.proxy.allow_bypass
+          AppConstants.MOZ_PROXY_BYPASS_PROTECTION ||
+          !Services.prefs.getBoolPref("network.proxy.allow_bypass", false) ||
           bypassProxy ||
           Services.startup.shuttingDown ||
           Utils.isOffline ||
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 64695e4c996d6..3ebe8b69bfdc2 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -482,6 +482,13 @@ this.AppConstants = Object.freeze({
     false,
 #endif
 
+  MOZ_PROXY_BYPASS_PROTECTION:
+#ifdef MOZ_PROXY_BYPASS_PROTECTION
+    true,
+#else
+    false,
+#endif
+
   // Returns true for CN region build when distibution id set as 'MozillaOnline'
   isChinaRepack() {
     return (

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits