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


Commits:
5c95a587 by Pier Angelo Vendrame at 2026-03-18T10:06:43+01:00
Bug 2016052 - Add a build flag to disable system preferences. r=gstoll

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

- - - - -
308c5454 by Pier Angelo Vendrame at 2026-03-18T10:06:44+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
=====================================
@@ -30,6 +30,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/mullvad-browser/-/compare/a61f0abe1841bf08f1d25226ff530b264efe58ee...308c5454e1a4d64e22610272c06393f2f1dda7da

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/a61f0abe1841bf08f1d25226ff530b264efe58ee...308c5454e1a4d64e22610272c06393f2f1dda7da
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