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


Commits:
5b368517 by Pier Angelo Vendrame at 2026-02-17T18:33:07+01:00
Bug 2016052 - Add a build flag to disable system preferences. r=gstoll

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

- - - - -
879ae694 by Pier Angelo Vendrame at 2026-02-17T18:33:19+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
=====================================
@@ -27,6 +27,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/mullvad-browser/-/compare/1985a8dc358ad3b143383efd63f6f78ca6f28c74...879ae694afbef1b23109d83c7bc4fbf47ba0a88a

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/1985a8dc358ad3b143383efd63f6f78ca6f28c74...879ae694afbef1b23109d83c7bc4fbf47ba0a88a
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