Skip to content

Commit a15074d

Browse files
authored
Perform TAO check for nested navigations
Closes #1221 and closes #1421.
1 parent 14898c0 commit a15074d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

fetch.bs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6090,9 +6090,6 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
60906090
<li><p>If <var>request</var>'s <a for=request>timing allow failed flag</a> is set, then return
60916091
failure.
60926092

6093-
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>basic</code>", then
6094-
return success.
6095-
60966093
<li><p>Let <var>values</var> be the result of
60976094
<a for="header list">getting, decoding, and splitting</a> `<code>Timing-Allow-Origin</code>` from
60986095
<var>response</var>'s <a for=response>header list</a>.
@@ -6102,6 +6099,20 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
61026099
<li><p>If <var>values</var> <a for=list>contains</a> the result of
61036100
<a>serializing a request origin</a> with <var>request</var>, then return success.
61046101

6102+
<li>
6103+
<p>If <var>request</var>'s <a for=request>mode</a> is "<code>navigate</code>" and
6104+
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>origin</a> is not
6105+
<a>same origin</a> with <var>request</var>'s <a for=request>origin</a>, then return failure.
6106+
6107+
<p class=note>This is necessary for navigations of a nested browsing context. There,
6108+
<var>request</var>'s <a for=request>origin</a> would be the container document's
6109+
<a for=Document>origin</a> and the <a>TAO check</a> would return failure. Since navigation timing
6110+
never validates the results of the <a>TAO check</a>, the nested document would still have access
6111+
to the full timing information, but the container document would not.
6112+
6113+
<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>basic</code>", then
6114+
return success.
6115+
61056116
<li><p>Return failure.
61066117
</ol>
61076118

0 commit comments

Comments
 (0)