[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-102.7.0esr-12.5-1] 2 commits: fixup! Firefox preference overrides.

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Mon Jan 30 16:13:34 UTC 2023



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


Commits:
43da6d54 by Pier Angelo Vendrame at 2023-01-30T14:40:42+01:00
fixup! Firefox preference overrides.

Bug 40788: Disable AS's calls to home.

We now also disable more AS tasks, but we could see it as a part of the
preferences we set to be sure it stays disabled.

- - - - -
e8921475 by Pier Angelo Vendrame at 2023-01-30T14:41:32+01:00
Bug 40788: Prevent nsIURLQueryStrippingListService from calling home when it is not enabled.

The URL query stripping service is enabled only in nightly builds,
still it is initialized and remote settings are downloaded.
This adds a condition that prevents the service from being initialized
if disabled.

Upstream Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1812594
We should remove this patch if Mozilla decides that this is a problem
also for them, or if they do not but we decide to use the feature.

- - - - -


2 changed files:

- browser/app/profile/001-base-profile.js
- browser/components/BrowserGlue.jsm


Changes:

=====================================
browser/app/profile/001-base-profile.js
=====================================
@@ -178,6 +178,15 @@ pref("browser.newtabpage.activity-stream.default.sites", "");
 pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
 pref("browser.newtabpage.activity-stream.telemetry", false);
 
+// tor-browser#40788: disable AS's calls to home.
+// Notice that null is between quotes because it is a JSON string.
+// Keep checked firefox.js to see if new entries are added.
+pref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "null");
+pref("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", "null");
+pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "null");
+pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", "null");
+pref("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", "null");
+
 // Disable fetching asrouter.ftl and related console errors (tor-browser#40763).
 pref("browser.newtabpage.activity-stream.asrouter.useRemoteL10n", false);
 


=====================================
browser/components/BrowserGlue.jsm
=====================================
@@ -2698,11 +2698,23 @@ BrowserGlue.prototype = {
 
       {
         task: () => {
-          // Init the url query stripping list.
-          let urlQueryStrippingListService = Cc[
-            "@mozilla.org/query-stripping-list-service;1"
-          ].getService(Ci.nsIURLQueryStrippingListService);
-          urlQueryStrippingListService.init();
+          // tor-browser#40788: Do not initialize
+          // nsIURLQueryStrippingListService to prevent it from initializing
+          // its remote settings if it's disabled.
+          // See also https://bugzilla.mozilla.org/show_bug.cgi?id=1812594
+          let enabledPref = "privacy.query_stripping.enabled";
+          let enabledPBMPref = "privacy.query_stripping.enabled.pbmode";
+
+          if (
+            Services.prefs.getBoolPref(enabledPref, false) ||
+            Services.prefs.getBoolPref(enabledPBMPref, false)
+          ) {
+            // Init the url query stripping list.
+            let urlQueryStrippingListService = Cc[
+              "@mozilla.org/query-stripping-list-service;1"
+            ].getService(Ci.nsIURLQueryStrippingListService);
+            urlQueryStrippingListService.init();
+          }
         },
       },
 



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/31831ff2e86470fced54745acc28fd0cbfcea23e...e8921475e5848b0cc46ef4e44c56fecae546e9e2

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230130/8147fbc0/attachment-0001.htm>


More information about the tor-commits mailing list