@@ -1892,6 +1892,25 @@ source of security bugs. Please seek security review for features that deal with
1892
1892
<a for="URL serializer"><i>exclude fragment</i></a> set to true.
1893
1893
</ol>
1894
1894
1895
+ <p> To check <dfn export>Cross-Origin-Embedder-Policy allows credentials</dfn> , given a
1896
+ <a for=/>request</a> <var> request</var> , run theses steps:
1897
+
1898
+ <ol>
1899
+ <li><p> If <var> request</var> 's <a for=request>mode</a> is not <code> no-cors</code> ", return
1900
+ true.</p>
1901
+
1902
+ <li><p> If <var> request</var> 's <a for=request>client</a> is null, return true.</p>
1903
+
1904
+ <li><p> If <var> request</var> 's <a for=request>client</a>' s <a for="environment settings
1905
+ object">embedder policy</a> is not
1906
+ "<code> <a for="embedder policy value">credentialless</a> </code> ", return true.</p>
1907
+
1908
+ <li><p> If <var> request</var> 's <a for=request>origin</a> is not <a>same origin</a> with
1909
+ <var> request</var> 's <a for=request>client</a>' s <a for="environment settings object">origin</a> ,
1910
+ return true.</p>
1911
+
1912
+ <li><p> Return false.</p>
1913
+ </ol>
1895
1914
1896
1915
<h4 id=responses>Responses</h4>
1897
1916
@@ -1978,6 +1997,10 @@ initially unset.
1978
1997
being provided to an API that didn't make a range request. See the flag's usage for a detailed
1979
1998
description of the attack.
1980
1999
2000
+ <p> A <a for=/>response</a> has an associated <dfn for=response
2001
+ id=concept-response-request-include-credentials> request-include-credentials</dfn> , which is
2002
+ initially set.
2003
+
1981
2004
<p> A <a for=/>response</a> has an associated
1982
2005
<dfn for=response id=concept-response-timing-allow-passed>timing allow passed flag</dfn> , which is
1983
2006
initially unset.
@@ -3421,9 +3444,29 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" / %s"cross-or
3421
3444
<li><p> If <var> policy</var> is neither `<code> same-origin</code> `, `<code> same-site</code> `, nor
3422
3445
`<code> cross-origin</code> `, then set <var> policy</var> to null.
3423
3446
3424
- <li><p> If <var> policy</var> is null and <var> embedderPolicyValue</var> is
3425
- "<code> <a for="embedder policy value">require-corp</a> </code> ", then set <var> policy</var> to
3426
- `<code> same-origin</code> `.
3447
+ <li><p> If <var> policy</var> is null, switch on <var> embedderPolicyValue</var> :
3448
+ <dl class=switch>
3449
+ <dt> `<a for="embedder policy value">unsafe-none</a> `
3450
+ <dt> `<a for="embedder policy value">credentialless</a> `
3451
+ <dd> Set <var> policy</var> to `<code> same-origin</code> ` if one of the
3452
+ following is true:
3453
+ <ul>
3454
+ <li><var> response</var> 's <a for="response">request-include-credentials</a> is true and
3455
+ <var> response</var> 's <a for="response">type</a> is "<code> opaque</code> ".
3456
+ <li><var> forNavigation</var> is true.
3457
+ </ul>
3458
+
3459
+ <dt> `<a for="embedder policy value">require-corp</a> `
3460
+ <dd> Set <var> policy</var> to `<code> same-origin</code> `.
3461
+ </dl>
3462
+ </li>
3463
+
3464
+ <li><p> If <var> policy</var> is null, <var> embedderPolicyValue</var> is
3465
+ "<code> <a for="embedder policy value">credentialless</a> </code> ", and
3466
+ <var> forNavigation</var> is true, then set <var> policy</var> to `<code> same-origin</code> `.
3467
+
3468
+ <li><p> If <var> policy</var> is null and <var> embedderPolicyValue</var> is "<code> <a for="embedder
3469
+ policy value">require-corp</a> </code> ", then set <var> policy</var> to `<code> same-origin</code> `.
3427
3470
3428
3471
<li>
3429
3472
<p> Switch on <var> policy</var> :
@@ -4585,6 +4628,10 @@ steps. They return a <a for=/>response</a>.
4585
4628
4586
4629
<p> is true; otherwise false.
4587
4630
4631
+ <li>
4632
+ <p> If <a>Cross-Origin-Embedder-Policy allows credentials</a> with
4633
+ <var> request</var> is false, set <var> includeCredentials</var> to false.</p>
4634
+
4588
4635
<li><p> Let <var> contentLength</var> be <var> httpRequest</var> 's <a for=request>body</a>' s
4589
4636
<a for=body>length</a> , if <var> httpRequest</var> 's <a for=request>body</a> is non-null;
4590
4637
otherwise null.
@@ -4945,6 +4992,9 @@ steps. They return a <a for=/>response</a>.
4945
4992
<li><p> If <var> httpRequest</var> 's <a for=request>header list</a> <a for="header list">contains</a>
4946
4993
`<code> Range</code> `, then set <var> response</var> 's <a for=response>range-requested flag</a> .
4947
4994
4995
+ <li><p> Set <var> response</var> 's <a for=response>request-include-credentials</a> to
4996
+ <var> includeCredentials</var> .
4997
+
4948
4998
<li>
4949
4999
<p> If <var> response</var> 's <a for=response>status</a> is 401, <var>httpRequest</var>' s
4950
5000
<a for=request>response tainting</a> is not "<code> cors</code> ", <var> includeCredentials</var> is
@@ -7758,6 +7808,7 @@ Arkadiusz Michalski,
7758
7808
Arne Johannessen,
7759
7809
Artem Skoretskiy,
7760
7810
Arthur Barstow,
7811
+ Arthur Sonzogni,
7761
7812
Asanka Herath,
7762
7813
Axel Rauschmayer,
7763
7814
Ben Kelly,
0 commit comments