mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 13:43:04 -05:00
Hotfix for broken Privacy & Security settings
Closes librewolf/issues#1964
This commit is contained in:
parent
d9dcb3cf95
commit
190c2a97d8
2 changed files with 73 additions and 0 deletions
|
@ -13,6 +13,7 @@ patches/hide-passwordmgr.patch
|
|||
patches/librewolf-prefs.patch
|
||||
patches/mozilla_dirs.patch
|
||||
patches/msix.patch
|
||||
patches/privacy-security-settings-hotfix.patch
|
||||
patches/remove_addons.patch
|
||||
patches/rust-gentoo-musl.patch
|
||||
patches/sed-patches/allow-searchengines-non-esr.patch
|
||||
|
|
72
patches/privacy-security-settings-hotfix.patch
Normal file
72
patches/privacy-security-settings-hotfix.patch
Normal file
|
@ -0,0 +1,72 @@
|
|||
# HG changeset patch
|
||||
# User Malte Jürgens <maltejur@dismail.de>
|
||||
# Date 1722462820 -7200
|
||||
# Wed Jul 31 23:53:40 2024 +0200
|
||||
# Node ID 457872813e06bcf474803cf0c9519809fbc5806a
|
||||
# Parent 265f9fb218cd9395f36a16714b1f295f4a996b76
|
||||
Bug 1910312 - Unbreak privacy and security settings when MOZ_DATA_REPORTING is disabled r?#settings-reviewers!
|
||||
|
||||
Disabling `MOZ_DATA_REPORTING` results in the `PREF_UPLOAD_ENABLED` pref not
|
||||
being loaded with `Preferences.add`. This means
|
||||
`Preferences.get(PREF_UPLOAD_ENABLED)` can possibly be `null`, which was
|
||||
previously not handled and resulted in an error for the whole privacy.js file.
|
||||
|
||||
So only call `dataCollectionCheckboxHandler` for the `privateAttribution`
|
||||
checkbox if `MOZ_DATA_REPORTING` is enabled (otherwise the `privateAttribution`
|
||||
checkbox also just doesn't exist). Also move the call into separate
|
||||
`initPrivateAttributionCheckbox` function to be more consistent with previous
|
||||
code.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D218265
|
||||
|
||||
diff --git a/browser/components/preferences/privacy.js b/browser/components/preferences/privacy.js
|
||||
--- a/browser/components/preferences/privacy.js
|
||||
+++ b/browser/components/preferences/privacy.js
|
||||
@@ -339,7 +339,7 @@ function dataCollectionCheckboxHandler({
|
||||
!collectionEnabled || Services.prefs.prefIsLocked(pref) || isDisabled();
|
||||
}
|
||||
|
||||
- Preferences.get(PREF_UPLOAD_ENABLED).on("change", updateCheckbox);
|
||||
+ Preferences.get(PREF_UPLOAD_ENABLED)?.on("change", updateCheckbox);
|
||||
updateCheckbox();
|
||||
}
|
||||
|
||||
@@ -1267,17 +1267,8 @@ var gPrivacyPane = {
|
||||
this.initOptOutStudyCheckbox();
|
||||
}
|
||||
this.initAddonRecommendationsCheckbox();
|
||||
+ this.initPrivateAttributionCheckbox();
|
||||
}
|
||||
- dataCollectionCheckboxHandler({
|
||||
- checkbox: document.getElementById("privateAttribution"),
|
||||
- pref: PREF_PRIVATE_ATTRIBUTION_ENABLED,
|
||||
- matchPref() {
|
||||
- return AppConstants.MOZ_TELEMETRY_REPORTING;
|
||||
- },
|
||||
- isDisabled() {
|
||||
- return !AppConstants.MOZ_TELEMETRY_REPORTING;
|
||||
- },
|
||||
- });
|
||||
|
||||
let signonBundle = document.getElementById("signonBundle");
|
||||
let pkiBundle = document.getElementById("pkiBundle");
|
||||
@@ -3568,6 +3559,19 @@ var gPrivacyPane = {
|
||||
});
|
||||
},
|
||||
|
||||
+ initPrivateAttributionCheckbox() {
|
||||
+ dataCollectionCheckboxHandler({
|
||||
+ checkbox: document.getElementById("privateAttribution"),
|
||||
+ pref: PREF_PRIVATE_ATTRIBUTION_ENABLED,
|
||||
+ matchPref() {
|
||||
+ return AppConstants.MOZ_TELEMETRY_REPORTING;
|
||||
+ },
|
||||
+ isDisabled() {
|
||||
+ return !AppConstants.MOZ_TELEMETRY_REPORTING;
|
||||
+ },
|
||||
+ });
|
||||
+ },
|
||||
+
|
||||
observe(aSubject, aTopic) {
|
||||
switch (aTopic) {
|
||||
case "sitedatamanager:updating-sites":
|
Loading…
Reference in a new issue