We no longer support the extension controlled notification for enhanced tracking protections
Categories
(Firefox :: Settings UI, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: hjones, Assigned: emz)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(3 files, 2 external files)
While removing non-SRD tests I noticed that we have a test for showing the extension controlled notification for the ETP setting in browser/components/preferences/tests/browser_extension_controlled.js that was failing with the new UI. Digging into it further it looks like we never ported over the extension controlled logic for that setting. It's possible this was intentional, but if it wasn't we should restore the notice.
Here are some changes I made locally to get the notice to show:
- Create a
manifest.jsonfile for the following extension:
{
"manifest_version": 2,
"name": "Test ETP Control",
"version": "1.0",
"description": "Test extension that controls Enhanced Tracking Protection",
"browser_specific_settings": {
"gecko": {
"id": "test-etp@mozilla.org"
}
},
"permissions": ["privacy"],
"background": {
"scripts": ["background.js"]
}
}
- navigate to
about:debugging#/runtime/this-firefoxand install the addon via "Load temporary add-on" - with the SRD pref disabled we see the extension controlled notification, with the SRD pref enabled the addon changes the value of the setting, but no notice shows
I think we just need to add these lines to the contentBlockingCategoryRadioGroup setting in privacy.mjs:
controllingExtensionInfo: {
storeId: "websites.trackingProtectionMode",
l10nId: "extension-controlling-websites-content-blocking-all-trackers",
},
Updated•1 month ago
|
| Reporter | ||
Comment 1•1 month ago
|
||
| Reporter | ||
Comment 2•1 month ago
|
||
Comment 3•1 month ago
|
||
| frontend-triage | ||
The redesign never got the ETP extension-control wiring. The contentBlockingCategoryRadioGroup setting in privacy.mjs has no controllingExtensionInfo. The generic support already handles this store key: Setting.mjs looks up ExtensionSettingsStore "prefs" / websites.trackingProtectionMode (which is what ext-privacy.js registers) and listens for extension-setting-changed:websites.trackingProtectionMode. Adding the config is enough to bring the message bar back.
One catch with the snippet in comment 0: without allowControl, setting-control.mjs disables the whole radio group. That disabled state cascades to every nested item, including the Custom radio and etpCustomizeButton, so the Customize sub-pane can't be reached. The legacy code in privacy.js only disabled Standard/Strict and left Custom alone.
Suggested fix, all in privacy.mjs:
contentBlockingCategoryRadioGroup: addcontrollingExtensionInfo: { storeId: "websites.trackingProtectionMode", l10nId: "extension-controlling-websites-content-blocking-all-trackers", allowControl: true }(precedent:connectionSettingsin main.js). IngetControlConfig, disable every option exceptetpLevelCustomwhilesetting.controllingExtensionInfo.idis set.getControlConfigcurrently returns early unless the policy check fires, and it changes options in place, so resetoption.disabledexplicitly when neither condition applies.etpCustomTrackingProtectionEnabled(privacy.mjs): add the samecontrollingExtensionInfowithoutallowControl. That disables the toggle and its nested…Contextselect, which matches the legacy disabling oftrackingProtectionMenu. Don't add it to the child too.
Tests: browser_extension_controlled.js (testExtensionControlledTrackingProtection) is only in the legacy tests/browser.toml, and no SRD browser test checks .extension-controlled-message-bar. Port that task to a new test under tests/etp/ listed in browser-srd.toml, using the message-bar assertions in test_setting_control_extension_controlled.html as a model.
Suggested severity: S3. An extension can silently override Enhanced Tracking Protection in the default (redesigned) settings with no notice or disable button. The setting still works, and the add-on can be disabled from about:addons.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.
Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.
Comment 4•28 days ago
|
||
Hey Ben, did you all have any additional information for this one?
Comment 5•28 days ago
|
||
Passing to :emz that did this section. However, this looks like a reasonable connection to an oversight at first glance.
| Assignee | ||
Comment 6•28 days ago
|
||
Oversight!
| Assignee | ||
Comment 7•27 days ago
|
||
Like the legacy settings, Standard and Strict are disabled while an
extension controls tracking protection, but Custom stays enabled so the
customize pane remains reachable.
| Assignee | ||
Comment 8•19 days ago
|
||
ExtensionPreferencesManager.setSetting records the extension in the
ExtensionSettingsStore even if the setting's prefs are locked, so the
redesigned settings would show the extension controlled notice and
disable controls although the extension has no effect. The legacy
settings hide the notice in that case.
Add ExtensionPreferencesManager.isSettingLocked and use it in Setting to
ignore the controlling extension while any of the setting's prefs are
locked.
Comment 10•1 day ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/39b992cb3225
https://hg.mozilla.org/mozilla-central/rev/10547383a9fd
Description
•