Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent cross-origin sensitive header probing #1434

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update fetch.bs
arichiv authored May 31, 2022
commit 077ab19f925ff79f44962b91c5ba72e56152cca0
14 changes: 8 additions & 6 deletions fetch.bs
Original file line number Diff line number Diff line change
@@ -4748,17 +4748,19 @@ these steps:

<ol>
<li>
<p>If <var>makeCORSPreflight</var> is true and one of these conditions is true:
<p>If one of these conditions is true:

<ul class=brief>
<li><p>There is no <a>method cache entry match</a> for <var>request</var>'s
<a for=request>method</a> using <var>request</var>, and either <var>request</var>'s
<li><p><var>makeCORSPreflight</var> is true and there is no <a>method cache entry match</a> for
<var>request</var>'s <a for=request>method</a> using <var>request</var>, and either <var>request</var>'s
<a for=request>method</a> is not a <a>CORS-safelisted method</a> or <var>request</var>'s
<a>use-CORS-preflight flag</a> is set.

<li>There is at least one <a for=list>item</a> in the <a>CORS-unsafe request-header names</a>
with <var>request</var>'s <a for=request>header list</a> for which there is no
<a>header-name cache entry match</a> using <var>request</var>.
<li><var>makeCORSPreflight</var> is true and there is at least one <a for=list>item</a> in the
<a>CORS-unsafe request-header names</a> with <var>request</var>'s <a for=request>header list</a>
for which there is no <a>header-name cache entry match</a> using <var>request</var>.

<li><a>Header size is over cors limit</a> is true.
</ul>

<p>Then: