Closed Bug 1856383 Opened 1 year ago Closed 2 months ago

MV3: Origin controls displays "Always allow on [site]" instead of "On All Sites" when http(s) host permission is requested

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: robwu, Assigned: rpl)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

With a Manifest Version 3 extension, Origin controls displays "Always allow on [site]" instead of "On All Sites" when the requested host permission is http://*/* or https://*/* (separately from *//*/* or <all_urls>). This is because the implementation relies on matchpatternset.subsumes(allDomains) with allDomains = new MatchPattern("*://*/*"): https://searchfox.org/mozilla-central/rev/95787423bc1c7ba895ef9c6918feb054866d9f41/toolkit/components/extensions/ExtensionPermissions.sys.mjs#560-562

And that in turns does not work due to bug 1856380.

Either bug 1856380 needs to be fixed, or the implementation linked above should use matchesAllWebUrls from part 1 of bug 1853409.

Minimal test case:

  1. Load extension with following manifest.json:
{
  "name": "http-https-perm",
  "manfest_version": 3,
  "version": "1",
  "host_permissions": [ "http://*/*", "https://*/*" ]
}
  1. Visit about:addons and grant the permission to all websites via the Permissions tab of the add-on ("Access your data for all websites").
  2. Visit example.com
  3. Click on the Extension Button.
  4. Click on the cog next to the add-on and look at the menu item.

Expected (this can be seen if you use "host_permissions": ["*://*/*"] instead):

  • "On All Sites"

Actual:

  • "Always allow on example.com"
Severity: -- → S4
Priority: -- → P3
Whiteboard: [addons-jira]
See Also: → 1905146
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/6e449c45ed4f
origin control message should show on all sites on http(s) host permissions. r=robwu,zombie
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: