Closed Bug 1756889 Opened 4 years ago Closed 3 years ago

Checking for the existence of a private field can trigger a SecurityException on cross-origin objects

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1726039

People

(Reporter: mgaudet, Assigned: mgaudet)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch testcase.patchSplinter Review

The attached WPT test checks a cross-domain iframe's Location object for the existence of a private field.

This throws SecurityError: Permission denied to access property #x on cross-origin object".

This violates the weak-map semantics expected of private fields.

When originally implemented, it seemed like it would make the most sense to
store private fields in the regular expando property DOM proxies already have. However,
they're subject to same-origin checking that doesn't properly map to the weak-map semantics
of private fields, and so this patch simply returns us to using the JS defined
proxy expando for private fields.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:mgaudet, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(peterv)
Flags: needinfo?(mgaudet)

This is actually going to get fixed under Bug 1726039; I will mark the rev as plan-changes until then. (and likely resolve this as dupe later)

Flags: needinfo?(peterv)
Flags: needinfo?(mgaudet)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Attachment #9265933 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: