@@ -490,7 +490,7 @@ spec:SRI; urlPrefix: https://w3c.github.io/webappsec-subresource-integrity
490
490
<ol class="algorithm">
491
491
1. If |serialized| is a [=byte sequence=] , then set |serialized| to be the result of
492
492
[=isomorphic decoding=] |serialized|.
493
-
493
+
494
494
2. Let |policy| be a new [=/policy=] with an empty [=policy/directive set=] , a [=policy/source=]
495
495
of |source|, and a [=policy/disposition=] of |disposition|.
496
496
@@ -693,8 +693,9 @@ spec:SRI; urlPrefix: https://w3c.github.io/webappsec-subresource-integrity
693
693
<dfn>keyword-source</dfn> = "<dfn>'self'</dfn> " / "<dfn>'unsafe-inline'</dfn> " / "<dfn>'unsafe-eval'</dfn> "
694
694
/ "<dfn>'strict-dynamic'</dfn> " / "<dfn>'unsafe-hashes'</dfn> "
695
695
/ "<dfn>'report-sample'</dfn> " / "<dfn>'unsafe-allow-redirects'</dfn> "
696
- / "<dfn>'wasm-unsafe-eval'</dfn> " / "<dfn>'report-sha256'</dfn> "
697
- / "<dfn>'report-sha384'</dfn> " / "<dfn>'report-sha512'</dfn> "
696
+ / "<dfn>'wasm-unsafe-eval'</dfn> " / "<dfn>'trusted-types-eval'</dfn> "
697
+ / "<dfn>'report-sha256'</dfn> " / "<dfn>'report-sha384'</dfn> "
698
+ / "<dfn>'report-sha512'</dfn> "
698
699
699
700
ISSUE: Bikeshed `unsafe-allow-redirects`.
700
701
@@ -1539,9 +1540,17 @@ spec:SRI; urlPrefix: https://w3c.github.io/webappsec-subresource-integrity
1539
1540
Otherwise if |policy| contains a [=directive=] whose [=directive/name=] is
1540
1541
"`default-src`", then set |source-list| to that directive's [=directive/value=] .
1541
1542
1542
- 3. If |source-list| is not null, and does not contain a [=source expression=] which is
1543
- an [=ASCII case-insensitive=] match for the string "<a grammar>`'unsafe-eval'`</a> ",
1544
- then:
1543
+ 1. If |source-list| is not null:
1544
+
1545
+ 1. Let |trustedTypesRequired| be the result of executing [$Does sink type require trusted types?$] , with
1546
+ |realm|, `'script' `, and `false`.
1547
+
1548
+ 1. If |trustedTypesRequired| is `true` and |source-list| contains a [=source expression=] which is an
1549
+ [=ASCII case-insensitive=] match for the string "<a grammar>`'trusted-types-eval'`</a> ", then skip the
1550
+ following steps.
1551
+
1552
+ 1. If |source-list| contains a [=source expression=] which is an [=ASCII case-insensitive=] match for the
1553
+ string "<a grammar>`'unsafe-eval'`</a> ", then skip the following steps.
1545
1554
1546
1555
1. Let |violation| be the result of executing [[#create-violation-for-global]] on
1547
1556
|global|, |policy|, and "`script-src`".
@@ -2861,8 +2870,8 @@ Content-Type: application/reports+json
2861
2870
<a grammar>nonce-source</a> or a <a grammar>hash-source</a> that matches
2862
2871
the inline block.
2863
2872
2864
- 4. The following JavaScript execution sinks are gated on the "`unsafe-eval`"
2865
- source expression :
2873
+ 4. The following JavaScript execution sinks are gated on the "`unsafe-eval`" and "`trusted-types-eval`"
2874
+ source expressions :
2866
2875
2867
2876
* {{eval()}}
2868
2877
* {{Function()}}
0 commit comments