diff options
author | grizzlyuser <grizzlyuser@protonmail.com> | 2024-01-26 21:56:01 +0100 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2024-02-17 09:04:39 -0500 |
commit | 529cb9ec668cba1f943b98397ebde4fd3194346c (patch) | |
tree | 1be22069bc9438e5e8602d15bea572a6f12e4f0e /libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch | |
parent | 7f6e6e1c4f7e34b203bbe3c652b886412cce3340 (diff) |
libre/iceweasel: 122.0, sync with upstream changes
Diffstat (limited to 'libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch')
-rw-r--r-- | libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch | 240 |
1 files changed, 121 insertions, 119 deletions
diff --git a/libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch b/libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch index 31f4a5b36..e81f2d598 100644 --- a/libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch +++ b/libre/iceweasel/9001-FSDG-sync-remote-settings-with-local-dump.patch @@ -1,4 +1,4 @@ -From 2699eccd5dc65f94d65738cec193e28e71f6321e Mon Sep 17 00:00:00 2001 +From 924f9c99de6f3223a46e472339c59726e60e5c79 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:20:39 +0200 Subject: [PATCH 01/13] Point to local omni.ja files, not remote server @@ -22,21 +22,48 @@ If necessary, missing files can be added later. [1] https://remote-settings.readthedocs.io/en/latest/introduction.html [2] https://www.gnu.org/distros/free-system-distribution-guidelines.en.html#license-rules --- - browser/components/newtab/bin/import-rollouts.js | 4 ++-- .../components/ASRouterAdmin/ASRouterAdmin.jsx | 2 +- - .../newtab/data/content/activity-stream.bundle.js | 2 +- + .../components/asrouter/content/asrouter-admin.bundle.js | 2 +- + browser/components/newtab/bin/import-rollouts.js | 4 ++-- services/settings/Utils.sys.mjs | 2 +- services/settings/docs/index.rst | 4 ++-- .../periodic-updates/scripts/periodic_file_updates.sh | 2 +- + third_party/rust/remote_settings/.cargo-checksum.json | 2 +- + third_party/rust/remote_settings/src/client.rs | 4 ++-- .../components/antitracking/docs/query-stripping/index.md | 2 +- .../backgroundtasks/BackgroundTask_message.sys.mjs | 4 ++-- toolkit/components/search/SearchUtils.sys.mjs | 8 ++++---- toolkit/components/search/docs/DefaultSearchEngines.rst | 2 +- .../components/search/docs/SearchEngineConfiguration.rst | 2 +- toolkit/modules/AppConstants.sys.mjs | 4 ++-- - toolkit/mozapps/defaultagent/RemoteSettings.cpp | 2 +- - 13 files changed, 20 insertions(+), 20 deletions(-) + 14 files changed, 22 insertions(+), 22 deletions(-) +diff --git a/browser/components/asrouter/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx b/browser/components/asrouter/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx +index 7d4484dc83..9346d518e6 100644 +--- a/browser/components/asrouter/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx ++++ b/browser/components/asrouter/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx +@@ -874,7 +874,7 @@ export class ASRouterAdminInner extends React.PureComponent { + <a + className="providerUrl" + target="_blank" +- href="https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/nimbus-desktop-experiments/records" ++ href="resource://app/defaults/settings/main/nimbus-desktop-experiments.json" + rel="noopener noreferrer" + > + nimbus-desktop-experiments +diff --git a/browser/components/asrouter/content/asrouter-admin.bundle.js b/browser/components/asrouter/content/asrouter-admin.bundle.js +index 614e8a62a1..3ce250c6ed 100644 +--- a/browser/components/asrouter/content/asrouter-admin.bundle.js ++++ b/browser/components/asrouter/content/asrouter-admin.bundle.js +@@ -1641,7 +1641,7 @@ class ASRouterAdminInner extends (react__WEBPACK_IMPORTED_MODULE_1___default().P + label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", null, "remote settings (", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("a", { + className: "providerUrl", + target: "_blank", +- href: "https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/nimbus-desktop-experiments/records", ++ href: "resource://app/defaults/settings/main/nimbus-desktop-experiments.json", + rel: "noopener noreferrer" + }, "nimbus-desktop-experiments"), ")"); + } diff --git a/browser/components/newtab/bin/import-rollouts.js b/browser/components/newtab/bin/import-rollouts.js index ce22d4a114..b2dc35e9d9 100644 --- a/browser/components/newtab/bin/import-rollouts.js @@ -59,34 +86,8 @@ index ce22d4a114..b2dc35e9d9 100644 console.log(`Fetching records from ${chalk.underline.yellow(RECORDS_URL)}`); -diff --git a/browser/components/newtab/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx b/browser/components/newtab/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx -index 3762be9c99..1a9c5028ff 100644 ---- a/browser/components/newtab/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx -+++ b/browser/components/newtab/content-src/components/ASRouterAdmin/ASRouterAdmin.jsx -@@ -1255,7 +1255,7 @@ export class ASRouterAdminInner extends React.PureComponent { - <a - className="providerUrl" - target="_blank" -- href="https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/nimbus-desktop-experiments/records" -+ href="resource://app/defaults/settings/main/nimbus-desktop-experiments.json" - rel="noopener noreferrer" - > - nimbus-desktop-experiments -diff --git a/browser/components/newtab/data/content/activity-stream.bundle.js b/browser/components/newtab/data/content/activity-stream.bundle.js -index 88a06b5702..a807face6a 100644 ---- a/browser/components/newtab/data/content/activity-stream.bundle.js -+++ b/browser/components/newtab/data/content/activity-stream.bundle.js -@@ -1787,7 +1787,7 @@ class ASRouterAdminInner extends (external_React_default()).PureComponent { - label = /*#__PURE__*/external_React_default().createElement("span", null, "remote settings (", /*#__PURE__*/external_React_default().createElement("a", { - className: "providerUrl", - target: "_blank", -- href: "https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/nimbus-desktop-experiments/records", -+ href: "resource://app/defaults/settings/main/nimbus-desktop-experiments.json", - rel: "noopener noreferrer" - }, "nimbus-desktop-experiments"), ")"); - } diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs -index c2db005b68..91aa355a87 100644 +index 73c83e526b..653cabe7e1 100644 --- a/services/settings/Utils.sys.mjs +++ b/services/settings/Utils.sys.mjs @@ -100,7 +100,7 @@ export var Utils = { @@ -117,7 +118,7 @@ index 3e042f67e4..dc8584c318 100644 #. Add the filename to the ``FINAL_TARGET_FILES`` list in ``services/settings/dumps/main/moz.build`` #. Add the filename to the ``[browser]`` section of ``mobile/android/installer/package-manifest.in`` IF the file should be bundled with Android. diff --git a/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh b/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh -index b88ee476da..440615e4e1 100755 +index 160b7fbc35..2e9dcde464 100755 --- a/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh +++ b/taskcluster/docker/periodic-updates/scripts/periodic_file_updates.sh @@ -286,7 +286,7 @@ function compare_suffix_lists { @@ -129,6 +130,36 @@ index b88ee476da..440615e4e1 100755 # 1. List remote settings collections from server. echo "INFO: fetch remote settings list from server" +diff --git a/third_party/rust/remote_settings/.cargo-checksum.json b/third_party/rust/remote_settings/.cargo-checksum.json +index 28ac46a2c2..e8a54e1bac 100644 +--- a/third_party/rust/remote_settings/.cargo-checksum.json ++++ b/third_party/rust/remote_settings/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"cf0a08d6b0d6285a459b78115aa24818a04b5987652655e64b80ffd8c8ae0813","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"3d87162e6913a81cc6f5178a7ca791e262d0d029e7dedf3df4fe2f66e5501185","src/config.rs":"7bb678addfae3b4ed5f2892d32263e5b33cc05e5a12a250f664150e78211f94a","src/error.rs":"192ca42af7c6b882f3129378c23b45dab8a0d2b179e23a8813a335ffd56b21dc","src/lib.rs":"416e99894e152f6cea7418ad2fabfd94bc3d907efd9f33fbd2a83fb99452b2df","src/remote_settings.udl":"e38758592ca75adbebb8fe688b10520d9931a5f3292d94f229cba05310756a43","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null} +\ No newline at end of file ++{"files":{"Cargo.toml":"cf0a08d6b0d6285a459b78115aa24818a04b5987652655e64b80ffd8c8ae0813","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"ff1ab5961fe695989d1ff343c5042ce0f907dc323da2ba87005fc9437919b448","src/config.rs":"7bb678addfae3b4ed5f2892d32263e5b33cc05e5a12a250f664150e78211f94a","src/error.rs":"192ca42af7c6b882f3129378c23b45dab8a0d2b179e23a8813a335ffd56b21dc","src/lib.rs":"416e99894e152f6cea7418ad2fabfd94bc3d907efd9f33fbd2a83fb99452b2df","src/remote_settings.udl":"e38758592ca75adbebb8fe688b10520d9931a5f3292d94f229cba05310756a43","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null} +diff --git a/third_party/rust/remote_settings/src/client.rs b/third_party/rust/remote_settings/src/client.rs +index 9585a7cc7c..1c97208b82 100644 +--- a/third_party/rust/remote_settings/src/client.rs ++++ b/third_party/rust/remote_settings/src/client.rs +@@ -33,7 +33,7 @@ impl Client { + pub fn new(config: RemoteSettingsConfig) -> Result<Self> { + let server_url = config + .server_url +- .unwrap_or_else(|| String::from("https://firefox.settings.services.mozilla.com")); ++ .unwrap_or_else(|| String::from("resource://app/defaults/settings")); + let bucket_name = config.bucket_name.unwrap_or_else(|| String::from("main")); + let base_url = Url::parse(&server_url)?; + +@@ -518,7 +518,7 @@ mod test { + }; + let client = Client::new(config).unwrap(); + assert_eq!( +- Url::parse("https://firefox.settings.services.mozilla.com").unwrap(), ++ Url::parse("resource://app/defaults/settings").unwrap(), + client.base_url + ); + assert_eq!(String::from("main"), client.bucket_name); diff --git a/toolkit/components/antitracking/docs/query-stripping/index.md b/toolkit/components/antitracking/docs/query-stripping/index.md index e49d8513ba..c1c6ae5deb 100644 --- a/toolkit/components/antitracking/docs/query-stripping/index.md @@ -158,10 +189,10 @@ index bb9d71b5c0..ec0c5f11d7 100644 // --preview: enable Remote Settings and Experiment previews. // diff --git a/toolkit/components/search/SearchUtils.sys.mjs b/toolkit/components/search/SearchUtils.sys.mjs -index 0e86068dd4..964475174e 100644 +index 8e474b58a2..a8cd3cccac 100644 --- a/toolkit/components/search/SearchUtils.sys.mjs +++ b/toolkit/components/search/SearchUtils.sys.mjs -@@ -152,13 +152,13 @@ export var SearchUtils = { +@@ -193,13 +193,13 @@ export var SearchUtils = { ENGINES_URLS: { "prod-main": @@ -201,10 +232,10 @@ index c782f9f7c3..4d773d27c5 100644 +.. _viewed live: resource://app/defaults/settings/main/search-config.json .. _Normandy: /toolkit/components/normandy/normandy/services.html diff --git a/toolkit/modules/AppConstants.sys.mjs b/toolkit/modules/AppConstants.sys.mjs -index b430666f68..0f640980ae 100644 +index 36b26056ec..ba54202045 100644 --- a/toolkit/modules/AppConstants.sys.mjs +++ b/toolkit/modules/AppConstants.sys.mjs -@@ -409,9 +409,9 @@ export var AppConstants = Object.freeze({ +@@ -416,9 +416,9 @@ export var AppConstants = Object.freeze({ REMOTE_SETTINGS_SERVER_URL: #ifdef MOZ_THUNDERBIRD @@ -216,41 +247,11 @@ index b430666f68..0f640980ae 100644 #endif REMOTE_SETTINGS_VERIFY_SIGNATURE: -diff --git a/third_party/rust/remote_settings/.cargo-checksum.json b/third_party/rust/remote_settings/.cargo-checksum.json -index 8794c625fe..d2752e72ef 100644 ---- a/third_party/rust/remote_settings/.cargo-checksum.json -+++ b/third_party/rust/remote_settings/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"c74e3df90cd82fb4ee00dd38d7e39cd7a0142ad601b8b63ae214978a28fbe1ac","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"3d87162e6913a81cc6f5178a7ca791e262d0d029e7dedf3df4fe2f66e5501185","src/config.rs":"7bb678addfae3b4ed5f2892d32263e5b33cc05e5a12a250f664150e78211f94a","src/error.rs":"192ca42af7c6b882f3129378c23b45dab8a0d2b179e23a8813a335ffd56b21dc","src/lib.rs":"416e99894e152f6cea7418ad2fabfd94bc3d907efd9f33fbd2a83fb99452b2df","src/remote_settings.udl":"e38758592ca75adbebb8fe688b10520d9931a5f3292d94f229cba05310756a43","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null} -\ No newline at end of file -+{"files":{"Cargo.toml":"c74e3df90cd82fb4ee00dd38d7e39cd7a0142ad601b8b63ae214978a28fbe1ac","build.rs":"4326f03729cf8f1673e4228e6dc111de1ea4d8bcc06351f7ae563efb2613f866","src/client.rs":"ff1ab5961fe695989d1ff343c5042ce0f907dc323da2ba87005fc9437919b448","src/config.rs":"7bb678addfae3b4ed5f2892d32263e5b33cc05e5a12a250f664150e78211f94a","src/error.rs":"192ca42af7c6b882f3129378c23b45dab8a0d2b179e23a8813a335ffd56b21dc","src/lib.rs":"416e99894e152f6cea7418ad2fabfd94bc3d907efd9f33fbd2a83fb99452b2df","src/remote_settings.udl":"e38758592ca75adbebb8fe688b10520d9931a5f3292d94f229cba05310756a43","uniffi.toml":"f8ec8dc593e0d501c2e9e40368ec93ec33b1edd8608e29495e0a54b63144e880"},"package":null} -diff --git a/third_party/rust/remote_settings/src/client.rs b/third_party/rust/remote_settings/src/client.rs -index 9585a7cc7c..1c97208b82 100644 ---- a/third_party/rust/remote_settings/src/client.rs -+++ b/third_party/rust/remote_settings/src/client.rs -@@ -33,7 +33,7 @@ impl Client { - pub fn new(config: RemoteSettingsConfig) -> Result<Self> { - let server_url = config - .server_url -- .unwrap_or_else(|| String::from("https://firefox.settings.services.mozilla.com")); -+ .unwrap_or_else(|| String::from("resource://app/defaults/settings")); - let bucket_name = config.bucket_name.unwrap_or_else(|| String::from("main")); - let base_url = Url::parse(&server_url)?; - -@@ -518,7 +518,7 @@ mod test { - }; - let client = Client::new(config).unwrap(); - assert_eq!( -- Url::parse("https://firefox.settings.services.mozilla.com").unwrap(), -+ Url::parse("resource://app/defaults/settings").unwrap(), - client.base_url - ); - assert_eq!(String::from("main"), client.bucket_name); -- -2.42.0 +2.43.0 -From d954757081cd70d27e0dc8d5adca68d95c97cb57 Mon Sep 17 00:00:00 2001 +From 3536b16aa46bda48ac8692ca72e978837fcef796 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:34:08 +0200 Subject: [PATCH 02/13] Remove polling triggered by push broadcasts @@ -291,10 +292,10 @@ index eea31ef192..529ecd6917 100644 * Call the listeners of the specified broadcasts. * diff --git a/services/settings/remote-settings.sys.mjs b/services/settings/remote-settings.sys.mjs -index 95896f5f6e..01111aa690 100644 +index b93da0f0e4..8d59bc6b05 100644 --- a/services/settings/remote-settings.sys.mjs +++ b/services/settings/remote-settings.sys.mjs -@@ -572,11 +572,7 @@ function remoteSettingsFunction() { +@@ -575,11 +575,7 @@ function remoteSettingsFunction() { moduleURI: import.meta.url, symbolName: "remoteSettingsBroadcastHandler", }; @@ -307,7 +308,7 @@ index 95896f5f6e..01111aa690 100644 }; return remoteSettings; -@@ -596,9 +592,6 @@ export var remoteSettingsBroadcastHandler = { +@@ -599,9 +595,6 @@ export var remoteSettingsBroadcastHandler = { `Push notification received (version=${version} phase=${phase})` ); @@ -319,10 +320,10 @@ index 95896f5f6e..01111aa690 100644 }, }; -- -2.42.0 +2.43.0 -From 01820751018f1b849884204d081816e7d4bcb9df Mon Sep 17 00:00:00 2001 +From 528c5d6d9437c003b731b3531273dbeb10422a0c Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:41:54 +0200 Subject: [PATCH 03/13] Remove timer that triggers polling for changes @@ -363,10 +364,10 @@ index 3bfed26ea4..807eb220ec 100644 -# see syntax https://searchfox.org/mozilla-central/rev/cc280c4be94ff8cf64a27cc9b3d6831ffa49fa45/toolkit/components/timermanager/UpdateTimerManager.jsm#155 -category update-timer RemoteSettingsComponents @mozilla.org/services/settings;1,getService,services-settings-poll-changes,services.settings.poll_interval,86400,259200 -- -2.42.0 +2.43.0 -From 400c2e04fa34d920e294c00235838083a0bf6bd4 Mon Sep 17 00:00:00 2001 +From d13036fd21af770da7d305d058ecedd560afba2f Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:47:41 +0200 Subject: [PATCH 04/13] Utils: fetch timestamps of each collection locally @@ -385,10 +386,10 @@ code that expects them. create mode 100644 services/settings/dumps/monitor/moz.build diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in -index 5296d2b4b1..6d8aa0e0b1 100644 +index b3213b8c44..0f953c3425 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in -@@ -260,6 +260,7 @@ +@@ -258,6 +258,7 @@ @RESPATH@/browser/defaults/settings/last_modified.json @RESPATH@/browser/defaults/settings/blocklists @RESPATH@/browser/defaults/settings/main @@ -397,10 +398,10 @@ index 5296d2b4b1..6d8aa0e0b1 100644 ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs -index 91aa355a87..c9e11531d4 100644 +index 653cabe7e1..e4d4247253 100644 --- a/services/settings/Utils.sys.mjs +++ b/services/settings/Utils.sys.mjs -@@ -369,7 +369,7 @@ export var Utils = { +@@ -376,7 +376,7 @@ export var Utils = { async fetchLatestChanges(serverUrl, options = {}) { const { expectedTimestamp, lastEtag = "", filters = {} } = options; @@ -409,7 +410,7 @@ index 91aa355a87..c9e11531d4 100644 const params = { ...filters, _expected: expectedTimestamp ?? 0, -@@ -384,7 +384,21 @@ export var Utils = { +@@ -391,7 +391,21 @@ export var Utils = { .map(([k, v]) => `${k}=${encodeURIComponent(v)}`) .join("&"); } @@ -432,7 +433,7 @@ index 91aa355a87..c9e11531d4 100644 if (response.status >= 500) { throw new Error(`Server error ${response.status} ${response.statusText}`); -@@ -419,7 +433,15 @@ export var Utils = { +@@ -426,7 +440,15 @@ export var Utils = { } } @@ -476,10 +477,10 @@ index f407580bfa..53e9d8b45e 100644 ] -- -2.42.0 +2.43.0 -From 906c6cdabc913a605cf91889503072cfaa7b9085 Mon Sep 17 00:00:00 2001 +From b2a061b8b79988eeef189af214fa03e4d7c76153 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:52:10 +0200 Subject: [PATCH 05/13] Utils: disable offline checking @@ -491,10 +492,10 @@ current and any future code that relies on it. 1 file changed, 10 deletions(-) diff --git a/services/settings/Utils.sys.mjs b/services/settings/Utils.sys.mjs -index c9e11531d4..092c94376f 100644 +index e4d4247253..296001536c 100644 --- a/services/settings/Utils.sys.mjs +++ b/services/settings/Utils.sys.mjs -@@ -183,16 +183,6 @@ export var Utils = { +@@ -190,16 +190,6 @@ export var Utils = { * @return {bool} Whether network is down or not. */ get isOffline() { @@ -512,10 +513,10 @@ index c9e11531d4..092c94376f 100644 }, -- -2.42.0 +2.43.0 -From 6e4aa6ad6c0579e96e7a3eb8d3c6d9de1d8fc898 Mon Sep 17 00:00:00 2001 +From 96d145c3ca83e835c4ec6711e75c01627e509ea0 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 17:56:02 +0200 Subject: [PATCH 06/13] Refactor hashing logic to a separate function @@ -566,10 +567,10 @@ index 1eeaf0bed9..d998a2d3b1 100644 /** -- -2.42.0 +2.43.0 -From ae2173787a6e4690ec4f63a367210753b3ea47be Mon Sep 17 00:00:00 2001 +From b612fe1de7381746ac51694a4110268d0769ca6c Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 18:05:02 +0200 Subject: [PATCH 07/13] Client: Fetch and hash records from local dump @@ -604,10 +605,10 @@ the upgrade to local-only setup. 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs -index 17a693ad93..b0efbd2403 100644 +index 7e95b9baab..989a3180b8 100644 --- a/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs -@@ -702,11 +702,9 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -706,11 +706,9 @@ export class RemoteSettingsClient extends EventEmitter { // If the data is up-to-date but don't have metadata (records loaded from dump), // we fetch them and validate the signature immediately. @@ -621,7 +622,7 @@ index 17a693ad93..b0efbd2403 100644 await this.db.importChanges(metadata); // We don't bother validating the signature if the dump was just loaded. We do // if the dump was loaded at some other point (eg. from .get()). -@@ -983,38 +981,28 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -987,38 +985,28 @@ export class RemoteSettingsClient extends EventEmitter { * @returns {Promise} */ async _validateCollectionSignature(records, timestamp, metadata) { @@ -668,7 +669,7 @@ index 17a693ad93..b0efbd2403 100644 } } -@@ -1181,24 +1169,26 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1185,24 +1173,26 @@ export class RemoteSettingsClient extends EventEmitter { * @param since timestamp of last sync (optional) */ async _fetchChangeset(expectedTimestamp, since) { @@ -712,10 +713,10 @@ index 17a693ad93..b0efbd2403 100644 remoteRecords, }; -- -2.42.0 +2.43.0 -From 4b80ad7284b8b2397afcc0c33de070e0c9abf223 Mon Sep 17 00:00:00 2001 +From 9eaa21162fc1e2abeb24381edd4bea01fd103065 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 18:42:56 +0200 Subject: [PATCH 08/13] Client: start deferred sync on get() or on() @@ -737,7 +738,7 @@ occurs during the session. 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs -index b0efbd2403..232fd5ddbf 100644 +index 989a3180b8..c2c2a5734b 100644 --- a/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs @@ -12,6 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, { @@ -817,10 +818,10 @@ index b0efbd2403..232fd5ddbf 100644 * Synchronize the local database with the remote server. * -- -2.42.0 +2.43.0 -From 4947e8705cdde1b78e223f2713edb435233d03b7 Mon Sep 17 00:00:00 2001 +From 4598808209c3a9a8cd3902053b250c88861bced2 Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 18:53:51 +0200 Subject: [PATCH 09/13] Client: deep compare records if timestamps match @@ -842,7 +843,7 @@ noticeable performance issues. 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs -index 232fd5ddbf..64fda00c7f 100644 +index c2c2a5734b..ee612a049c 100644 --- a/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs @@ -9,6 +9,7 @@ import { Downloader } from "resource://services-settings/Attachments.sys.mjs"; @@ -853,7 +854,7 @@ index 232fd5ddbf..64fda00c7f 100644 ClientEnvironmentBase: "resource://gre/modules/components-utils/ClientEnvironment.sys.mjs", Database: "resource://services-settings/Database.sys.mjs", -@@ -1169,7 +1170,10 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1173,7 +1174,10 @@ export class RemoteSettingsClient extends EventEmitter { const old = oldById.get(r.id); if (old) { oldById.delete(r.id); @@ -866,10 +867,10 @@ index 232fd5ddbf..64fda00c7f 100644 } } else { -- -2.42.0 +2.43.0 -From 31e3597a5fc978ccbec4dda6ee51a129f8a41a1e Mon Sep 17 00:00:00 2001 +From 79445efeb9c18ad9c2e2c4070cdc72aa6b736d1e Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 19:01:39 +0200 Subject: [PATCH 10/13] Client: delete more data on cleanup @@ -887,7 +888,7 @@ logic gets the data about the attachments from those records. 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs -index 64fda00c7f..396f1c3eac 100644 +index ee612a049c..b3c6caebba 100644 --- a/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs @@ -255,7 +255,7 @@ class AttachmentDownloader extends Downloader { @@ -899,7 +900,7 @@ index 64fda00c7f..396f1c3eac 100644 ) ); } -@@ -1129,7 +1129,7 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1133,7 +1133,7 @@ export class RemoteSettingsClient extends EventEmitter { // Signature failed, clear local DB because it contains // bad data (local + remote changes). lazy.console.debug(`${this.identifier} clear local data`); @@ -908,7 +909,7 @@ index 64fda00c7f..396f1c3eac 100644 // Local data was tampered, throw and it will retry from empty DB. lazy.console.error(`${this.identifier} local data was corrupted`); throw new CorruptedDataError(this.identifier); -@@ -1151,7 +1151,7 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1155,7 +1155,7 @@ export class RemoteSettingsClient extends EventEmitter { // _importJSONDump() only clears DB if dump is available, // therefore do it here! if (imported < 0) { @@ -917,7 +918,7 @@ index 64fda00c7f..396f1c3eac 100644 } } } -@@ -1191,6 +1191,12 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1195,6 +1195,12 @@ export class RemoteSettingsClient extends EventEmitter { return syncResult; } @@ -931,10 +932,10 @@ index 64fda00c7f..396f1c3eac 100644 * Fetch information from changeset endpoint. * -- -2.42.0 +2.43.0 -From 0e73e5552e2c9b4189a1bb19ce086420e5f54336 Mon Sep 17 00:00:00 2001 +From 24ba3c8ca82381eba887a318fb09f6d24e07064c Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 19:07:56 +0200 Subject: [PATCH 11/13] Client: remove comparison of collection timestamps @@ -949,10 +950,10 @@ necessary cleanup. So remove the checks. 1 file changed, 5 deletions(-) diff --git a/services/settings/RemoteSettingsClient.sys.mjs b/services/settings/RemoteSettingsClient.sys.mjs -index 396f1c3eac..60be4b0372 100644 +index b3c6caebba..264a6cc831 100644 --- a/services/settings/RemoteSettingsClient.sys.mjs +++ b/services/settings/RemoteSettingsClient.sys.mjs -@@ -1071,14 +1071,9 @@ export class RemoteSettingsClient extends EventEmitter { +@@ -1075,14 +1075,9 @@ export class RemoteSettingsClient extends EventEmitter { updated: [], deleted: [], }; @@ -968,10 +969,10 @@ index 396f1c3eac..60be4b0372 100644 await this.db.importChanges(metadata, remoteTimestamp, remoteRecords, { clear: retry, -- -2.42.0 +2.43.0 -From 1423f0168d322121a302b227be9ae64fd9f0adea Mon Sep 17 00:00:00 2001 +From 633d8d40e00786b388e62898e32414d1305fa91f Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 19:15:44 +0200 Subject: [PATCH 12/13] Attachments: load only from dump and drop cached @@ -1060,10 +1061,10 @@ index 5ddc6bb046..f7888cb769 100644 /** -- -2.42.0 +2.43.0 -From 961ada13d31f49efbc1e8b56aa8a8811ca61408a Mon Sep 17 00:00:00 2001 +From c0b96623a42ed3c74218fcc2574f78196fd901ff Mon Sep 17 00:00:00 2001 From: grizzlyuser <grizzlyuser@protonmail.com> Date: Wed, 30 Dec 2020 19:22:20 +0200 Subject: [PATCH 13/13] Disable CRLite entirely for now @@ -1088,10 +1089,10 @@ certificate revocations. 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml -index c7ca7ae249..f5d7c4e320 100644 +index 592ddd3229..9688ee64fd 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml -@@ -13980,7 +13980,7 @@ +@@ -14167,7 +14167,7 @@ # 3: Consult CRLite and enforce "Not Revoked" results, but defer to OCSP for "Revoked". - name: security.pki.crlite_mode type: RelaxedAtomicUint32 @@ -1101,7 +1102,7 @@ index c7ca7ae249..f5d7c4e320 100644 - name: security.tls.version.min diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp -index 3893cdcdf2..adf85992a4 100644 +index dd14b5c24c..90350be691 100644 --- a/security/manager/ssl/nsNSSComponent.cpp +++ b/security/manager/ssl/nsNSSComponent.cpp @@ -1129,6 +1129,7 @@ void nsNSSComponent::setValidationOptions( @@ -1113,4 +1114,5 @@ index 3893cdcdf2..adf85992a4 100644 case CRLiteMode::Disabled: case CRLiteMode::TelemetryOnly: -- -2.42.0 +2.43.0 + |