Closed Bug 1892860 Opened 2 years ago Closed 2 years ago

add and remove optional permissions not updating the entire list

Categories

(GeckoView :: Extensions, defect)

All
Android
defect

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: zmckenney, Assigned: amejia)

References

Details

(Whiteboard: [addons-jira])

Attachments

(3 files, 1 external file)

When adding or removing multiple optional permissions, not all are changed. I've updated screenshots of examples I've found in testing so far.

STR

  1. Breakpoint the call before addonManager.addOptionalPermission to see the String list that is being added as optional host permissions
  2. Breakpoint the success callback
  3. Pass a list of origin permissions to addonManager.addOptionalPermission. My test manifest is below for reference but in my screenshots you'll see I did not add any to the list that map to <all_urls>`:
"host_permissions": [
    "http://*/",
    "https://*/",
    "file://*/*",
    "https://*.openai.com/*",
    "https://*.bing.com/*",
    "https://*.poe.com/*",
    "https://*.google.com/*",
    "https://claude.ai/*",
    "https://*.moonshot.cn/*",
    "https://bugzilla.mozilla.org/buglist.cgi?order=Importance&product=Fenix&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&bug_status=NEW&query_format=advanced&component=WebExtensions&resolution=---",
    "https://bugzilla.mozilla.org/buglist.cgi?product=Fenix&component=Accounts%20and%20Sync&list_id=16992048&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&query_format=advanced&resolution=---",
    "https://bugzilla.mozilla.org/buglist.cgi?product=Fenix&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&list_id=16992049&resolution=---&query_format=advanced&component=App%20Links",
    "https://bugzilla.mozilla.org/buglist.cgi?product=Fenix&list_id=16992050&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&query_format=advanced&component=Autofill&resolution=---",
    "https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&component=Bookmarks&product=Fenix&list_id=16992051&resolution=---&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other",
    "https://bugzilla.mozilla.org/buglist.cgi?classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&list_id=16992053&product=Fenix&component=Browser%20Engine&query_format=advanced&resolution=---",
    "https://bugzilla.mozilla.org/buglist.cgi?product=Fenix&query_format=advanced&list_id=16992054&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&component=Collections&resolution=---",
    "https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&resolution=---&list_id=16992055&product=Fenix&component=Crash%20Reporting&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other"
  ],

Expected Result

The Addon has the entire list of permissions updated

Actual Results

Only some of the permissions are updated. In the test case shown it did not grant any of the bugzilla urls.

Attached file draft.diff —
I wrote that on Slack the other day but I am going to add it here as well. This draft patch should help fix this bug.

Thanks!

Assignee: nobody → amejiamarmol
Status: NEW → ASSIGNED
Pushed by amejiamarmol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c550978cd25 normalize optional origins to export extensions r=rpl
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Regressions: 1895478
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: