Closed Bug 1648812 Opened 5 years ago Closed 5 years ago

The "storage access granted" console log for requestStorageAccess is incorrect

Categories

(Core :: Privacy: Anti-Tracking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: englehardt, Assigned: timhuang, NeedInfo)

Details

Attachments

(1 file)

STR:

ER: You see the console log Storage access granted for origin “https://englehardt-tracker.com” on “https://senglehardt.com”.

AR: You see the console log Storage access granted for origin “https://englehardt-tracker.com” on “https://englehardt-tracker.com”.

This log results from the call to ReportUnblockingToConsole within CompleteAllowAccessFor. According to the comments at the top of CompleteAllowAccessFor, "aParentContext is the browsing context of the document that calls this API" for requestStorageAccess. Instead of logging aParentContext we need to retrieve the top parent context.

Note that the actual storage access permission seems to be granted to the correct origin, so this is just a logging issue. You can test across two versions of the top-level page:

Flags: needinfo?(tihuang)
Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Flags: needinfo?(tihuang)
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b9cb4e5086f Moving ReportUnblockingToConsole to the parent process and fix the console message. r=dimi
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Flags: qe-verify+

I’ve reproduced the issue with Fx 79.0a1 (2020-06-26) on Windows 10. I can see the correct message with Fx 81.0a1 (2020-08-09) on Windows 10 and Ubuntu 18.04. But I can see the console message only on Nightly builds. I am not able to trigger any message on Beta. Can I confirm the fix on Beta somehow?

Flags: needinfo?(senglehardt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: