Closed Bug 1795359 Opened 3 years ago Closed 3 years ago

SitePermsAddonProvider and SitePermsAddonWrapper entries should account for the gated permission to be granted for multiple principal sharing the same siteOriginSuffix

Categories

(Toolkit :: Add-ons Manager, defect, P1)

defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
firefox108 --- verified
firefox109 --- verified

People

(Reporter: rpl, Assigned: nchevobbe)

References

Details

(Whiteboard: [addons-jira])

Attachments

(3 files, 1 obsolete file)

STR:
(1) fresh profile, flip the pref, restart.
(2) Go to https://ryoyakawai.github.io/smfplayer/ , accept the addon install prompt. Verify it shows up in about:addons.
(3) Open a PB window. Go to https://ryoyakawai.github.io/smfplayer/ . See new prompt. Accept prompt.
(4) Close PB window. Reopen PB window, see that access is still allowed.
(5) Go to about:addons and remove the addon.
(6) Restart browser, addon reappears in about:addons

In SitePermsAddonWrapper, we are keeping track of permission with a uniqueness on the permission type.
But for a given permission type and origin, multiple permissions can be set (for PB, contexts, ...).
This patch make it so we bookkeep all the permission that are passed, so we can then later properly
remove them when the addon gets uninstalled, or when individual permission are being revoked.

Attachment #9298679 - Attachment is obsolete: true
Assignee: lgreco → nchevobbe
Whiteboard: [addons-jira]
Blocks: 1794579
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ac1330b68d3e Handle permissions for different origin attributes in SitePermsAddonProvider. r=rpl
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d236f29e2be4 Handle permissions.isolateBy.userContext in test_sitePermsAddonProvider. r=rpl.
Flags: qe-verify+

Hello,

Verified as Fixed on the latest Nightly (109.0a1/20221116182402) and Beta (108.0b2/20221115200658). Tested on Windows 10 x64 and Ubuntu 16.04 LTS.
Following the STR from Comment 0, upon performing Step 6, the add-on does not reappear in about:addons, confirming the fix.

For further details, see the attached video depicting the STR being performed on Nightly. Same results are obtained on Beta so I did not attach a video from that version.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Attached video 2022-11-17_09h49_04.mp4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: