Pier Angelo Vendrame pushed to branch tor-browser-147.0a1-16.0-2 at The Tor 
Project / Applications / Tor Browser


Commits:
38e3d053 by Pier Angelo Vendrame at 2026-02-17T16:02:48+01:00
Bug 2016052 - Add a build flag to disable system preferences. r=gstoll

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

- - - - -
a2fa7105 by Pier Angelo Vendrame at 2026-02-17T17:39:20+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
=====================================
@@ -29,6 +29,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
=====================================
@@ -5218,7 +5218,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
=====================================
@@ -4052,6 +4052,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/c0dcd202af7ddf205d15576c07e60a59a84d4bb6...a2fa71050bc1b84b741551aa08e81d242ae7733a

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


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

Reply via email to