Pier Angelo Vendrame pushed to branch tor-browser-140.9.0esr-15.0-1 at The Tor 
Project / Applications / Tor Browser


Commits:
3e03706c by Pier Angelo Vendrame at 2026-03-18T08:57:23+01:00
Bug 2016052 - Add a build flag to disable system preferences. r=gstoll

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

- - - - -
f1207b18 by Pier Angelo Vendrame at 2026-03-18T08:57:52+01:00
fixup! Base Browser's .mozconfigs.

BB 44394: Disable preferences from /etc/firefox on Linux.

- - - - -


3 changed files:

- browser/config/mozconfigs/base-browser
- modules/libpref/Preferences.cpp
- toolkit/moz.configure


Changes:

=====================================
browser/config/mozconfigs/base-browser
=====================================
@@ -32,6 +32,8 @@ ac_add_options --enable-proxy-bypass-protection
 # See bugs #30575 and #32418: system policies are harmful either because they
 # could allow proxy bypass, and override a number of other preferences we set
 ac_add_options --disable-system-policies
+# tor-browser#44394
+ac_add_options --disable-system-preferences
 
 # See bug #41131
 ac_add_options --disable-backgroundtasks


=====================================
modules/libpref/Preferences.cpp
=====================================
@@ -5082,7 +5082,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) 
{
     }
   }
 
-#if defined(MOZ_WIDGET_GTK)
+#if defined(MOZ_WIDGET_GTK) && defined(MOZ_SYSTEM_PREFERENCES)
   // To ensure the system-wide preferences are not overwritten by
   // firefox/browser/defauts/preferences/*.js we need to load
   // the /etc/firefox/defaults/pref/*.js settings as last.


=====================================
toolkit/moz.configure
=====================================
@@ -3961,6 +3961,17 @@ option(
 
 set_config("MOZ_SYSTEM_POLICIES", True, when="--enable-system-policies")
 
+# System preferences
+# ==============================================================
+
+option(
+    "--disable-system-preferences",
+    help="Disable reading preferences from /etc/firefox",
+)
+
+set_config("MOZ_SYSTEM_PREFERENCES", True, when="--enable-system-preferences")
+set_define("MOZ_SYSTEM_PREFERENCES", True, when="--enable-system-preferences")
+
 # Allow disabling the creation a legacy profile
 # ==============================================================
 



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/56671b70c11181e1bcea56264d311aa67888585b...f1207b18f724023843131ee640172c7622768bad

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/56671b70c11181e1bcea56264d311aa67888585b...f1207b18f724023843131ee640172c7622768bad
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to