Skip to content

Commit 205659f

Browse files
committed
Tweak the exposure of cross-origin properties
This contains two separate changes: * It makes all cross-origin properties that would normally be enumerable on same-origin objects, enumerable also on WindowProxy and Location objects (including when accessed same-origin). This includes safelisted methods and attributes, browsing context name properties, and browsing context index properties. The motivation for making them non-enumerable seems to have been a mistaken impression that doing so would prevent a cross-origin information leak. * It hides window names from [[OwnPropertyKeys]](), and thus Object.keys(), Object.getOwnPropertyNames(), etc. This actually prevents a cross-origin information leak. Closes whatwg#2753.
1 parent 7f4c34a commit 205659f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77489,7 +77489,7 @@ console.assert(iframeWindow.frameElement === null);
7748977489
browsing context name property set</span>:</p>
7749077490

7749177491
<ol>
77492-
<li><p>Add { [[Property]]: <var>e</var> } as the last element of
77492+
<li><p>Add { [[Property]]: <var>e</var>, [[HideFromKeys]]: true } as the last element of
7749377493
<var>crossOriginWindowProperties</var>.</p></li>
7749477494
</ol>
7749577495
</li>
@@ -77555,7 +77555,7 @@ console.assert(iframeWindow.frameElement === null);
7755577555

7755677556
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7755777557
[[Value]]: <var>value</var>,
77558-
[[Enumerable]]: false,
77558+
[[Enumerable]]: true,
7755977559
[[Writable]]: false,
7756077560
[[Configurable]]: true }.</p></li>
7756177561
</ol>
@@ -77582,7 +77582,7 @@ console.assert(iframeWindow.frameElement === null);
7758277582
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
7758377583
[[Get]]: <var>crossOriginGet</var>,
7758477584
[[Set]]: <var>crossOriginSet</var>,
77585-
[[Enumerable]]: false,
77585+
[[Enumerable]]: true,
7758677586
[[Configurable]]: true }.</p></li>
7758777587
</ol>
7758877588
</li>
@@ -77660,7 +77660,8 @@ console.assert(iframeWindow.frameElement === null);
7766077660
<span>CrossOriginProperties</span>(<var>O</var>):</p>
7766177661

7766277662
<ol>
77663-
<li><p>Add <var>e</var>.[[Property]] as the last element of <var>keys</var>.</p></li>
77663+
<li><p>If <var>e</var>.[[HideFromKeys]] is not true, <span data-x="list append">append</span>
77664+
<var>e</var>.[[Property]] to <var>keys</var>.</p></li>
7766477665
</ol>
7766577666
</li>
7766677667

@@ -78753,7 +78754,7 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
7875378754
<li><p>Return <span>PropertyDescriptor</span>{
7875478755
[[Value]]: <var>value</var>,
7875578756
[[Writable]]: false,
78756-
[[Enumerable]]: false,
78757+
[[Enumerable]]: true,
7875778758
[[Configurable]]: true }.</p></li>
7875878759
</ol>
7875978760
</li>
@@ -78783,7 +78784,7 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
7878378784

7878478785
<li><p>Return <span>PropertyDescriptor</span>{
7878578786
[[Value]]: <var>value</var>,
78786-
[[Enumerable]]: false,
78787+
[[Enumerable]]: true,
7878778788
[[Writable]]: false,
7878878789
[[Configurable]]: true }.</p></li>
7878978790
</ol>

0 commit comments

Comments
 (0)