Closed Bug 1502238 Opened 2 years ago Closed 2 years ago

When clearing site data, clear storage permissions assigned to a tracker

Categories

(Firefox :: Protections UI, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: ehsan, Assigned: baku)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If the user has a "3rdPartyStorage^tracker.example" permission stored in their permission manager database, and clears site data for tracker.example, right now that permission will survive.

It would be nice to clear it.

Andrea, any chance you could take this please?  Thanks!
Flags: needinfo?(amarchesini)
Attached patch cleanup.patchSplinter Review
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #9020319 - Flags: review?(ehsan)
Comment on attachment 9020319 [details] [diff] [review]
cleanup.patch

Review of attachment 9020319 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks a lot!

::: toolkit/components/cleardata/tests/unit/test_permissions.js
@@ +66,5 @@
> +
> +  const oneMoreUri = Services.io.newURI("https://example.org");
> +  const oneMorePrincipal = Services.scriptSecurityManager.createCodebasePrincipal(oneMoreUri, {});
> +  Services.perms.addFromPrincipal(oneMorePrincipal, "cookie",  Services.perms.ALLOW_ACTION);
> +  Services.perms.addFromPrincipal(oneMorePrincipal, "3rdPartyStorage^https://example.net^https://example.org",  Services.perms.ALLOW_ACTION);

For completeness, maybe add a test for 3rdPartyStorage^https://example.org^https://example.net too?
Attachment #9020319 - Flags: review?(ehsan) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9f2f0ad93b3
When clearing site data, clear storage permissions assigned to a tracker, r=ehsan
https://hg.mozilla.org/mozilla-central/rev/e9f2f0ad93b3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.