diff --git a/fetch.bs b/fetch.bs index a1d323376..cf5bb58c1 100644 --- a/fetch.bs +++ b/fetch.bs @@ -1892,6 +1892,27 @@ source of security bugs. Please seek security review for features that deal with exclude fragment set to true. +
To check if Cross-Origin-Embedder-Policy allows credentials, given a +request request, run these steps: + +
If request's mode is not "no-cors
", then return
+ true.
If request's client is null, then return true.
+ +If request's client's
+ policy container's
+ embedder policy's value is not
+ "credentialless
", then return true.
If request's origin is same origin with + request's current URL's origin and + request's tainted origin flag is not set, then return true.
+ +Return false.
+A response has an associated request-includes-credentials +(a boolean), which is initially true. +
A response has an associated timing allow passed flag, which is initially unset. @@ -3456,7 +3480,7 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" / %s"cross-or
If the cross-origin resource policy internal check with origin,
- "unsafe-none
", response, and
+ "unsafe-none
", response, and
forNavigation returns blocked, then return blocked.
This step is needed because we don't want to report violations not related to @@ -3491,7 +3515,7 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" / %s"cross-or
If forNavigation is true and embedderPolicyValue is
- "unsafe-none
", then return allowed.
+ "unsafe-none
", then return allowed.
Let policy be the result of getting @@ -3500,16 +3524,33 @@ Cross-Origin-Resource-Policy = %s"same-origin" / %s"same-site" / %s"cross-or
This means that `Cross-Origin-Resource-Policy: same-site, same-origin
`
ends up as allowed below as it will never match anything, as long as
- embedderPolicyValue is "unsafe-none
".
+ embedderPolicyValue is "unsafe-none
".
Two or more `Cross-Origin-Resource-Policy
` headers will have the
same effect.
If policy is neither `same-origin
`, `same-site
`, nor
`cross-origin
`, then set policy to null.
-
If policy is null and embedderPolicyValue is
- "require-corp
", then set policy to
- `same-origin
`.
+
If policy is null, then switch on embedderPolicyValue:
+ +unsafe-none
"
+ Do nothing. + +
credentialless
"
+ Set policy to `same-origin
` if:
+
+
require-corp
"
+ Set policy to `same-origin
`.
+
Switch on policy: @@ -4668,6 +4709,9 @@ steps. They return a response.
is true; otherwise false. +
If Cross-Origin-Embedder-Policy allows credentials with request returns + false, then set includeCredentials to false. +
Let contentLength be httpRequest's body's length, if httpRequest's body is non-null; otherwise null. @@ -5028,6 +5072,9 @@ steps. They return a response.
If httpRequest's header list contains
`Range
`, then set response's range-requested flag.
+
Set response's request-includes-credentials to + includeCredentials. +
If response's status is 401, httpRequest's
response tainting is not "cors
", includeCredentials is
@@ -7843,6 +7890,7 @@ Arkadiusz Michalski,
Arne Johannessen,
Artem Skoretskiy,
Arthur Barstow,
+Arthur Sonzogni,
Asanka Herath,
Axel Rauschmayer,
Ben Kelly,