Open Bug 2063090 Opened 3 months ago Updated 3 months ago

ExtensionSettings blocking all installs does not disable CFR add-on recommendations

Categories

(Firefox :: Enterprise Policies, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: mkaply, Unassigned)

References

Details

Setting ExtensionSettings with "*": { "installation_mode": "blocked" } blocks all extension installs and disables the about:addons discovery pane, but it does not disable CFR add-on recommendations. InstallAddonsPermission with Default: false does disable them.

In browser/components/enterprisepolicies/Policies.sys.mjs, the ExtensionSettings block-all path locks extensions.getAddons.showPane and extensions.htmlaboutaddons.recommendations.enabled, but not browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons or browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features. InstallAddonsPermission with Default: false locks all four.

The result is that an administrator who blocks all extension installs via ExtensionSettings still receives CFR recommendations for add-ons the user cannot install.

Steps to reproduce

  1. Create distribution/policies.json containing { "policies": { "ExtensionSettings": { "*": { "installation_mode": "blocked" } } } }
  2. Start Firefox with a new profile
  3. Check browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons in about:config

Actual result: the pref is untouched and add-on recommendations remain enabled.

Expected result: the pref is locked to false, matching InstallAddonsPermission.

Suggested fix

Rather than duplicating the pref list in each policy, extract a shared helper for the "the user cannot install extensions, so stop advertising them" consequences and call it from both. These two policies have already diverged this way once: bug 2041238 fixed the mirror-image gap where InstallAddonsPermission did not lock extensions.getAddons.showPane.

Enforcement should stay separate: ExtensionSettings rejects per add-on via mayInstallAddon, while InstallAddonsPermission locks xpinstall.enabled and disallows the xpinstall feature. Only the advertising side effects should be shared.

The severity field is not set for this bug.
:mkaply, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mozilla)
Severity: -- → N/A
Type: defect → enhancement
Flags: needinfo?(mozilla)
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.