|
1214 | 1214 | </style>
|
1215 | 1215 | <meta content="Bikeshed version 0dd2bba6dfda6c3168490a3a3044dd1d0b1ef8e0" name="generator">
|
1216 | 1216 | <link href="https://w3c.github.io/webappsec-trusted-types/dist/spec/" rel="canonical">
|
1217 |
| - <meta content="db82179c1fb92cb256cb3bf32886480e4b23cb17" name="document-revision"> |
| 1217 | + <meta content="aaf9b745a15eb5952b7fbcada1d917f2788241fb" name="document-revision"> |
1218 | 1218 | <style>/* style-md-lists */
|
1219 | 1219 |
|
1220 | 1220 | /* This is a weird hack for me not yet following the commonmark spec
|
|
1461 | 1461 | <div class="head">
|
1462 | 1462 | <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
|
1463 | 1463 | <h1 class="p-name no-ref" id="title">Trusted Types</h1>
|
1464 |
| - <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2020-03-09">9 March 2020</time></span></h2> |
| 1464 | + <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2020-03-11">11 March 2020</time></span></h2> |
1465 | 1465 | <div data-fill-with="spec-metadata">
|
1466 | 1466 | <dl>
|
1467 | 1467 | <dt>This version:
|
@@ -3101,7 +3101,8 @@ <h4 class="heading settled" data-level="4.5.2" id="trusted-types-csp-directive">
|
3101 | 3101 | <pre>directive-name = "trusted-types"
|
3102 | 3102 | directive-value = <a data-link-type="dfn" href="#serialized-tt-configuration" id="ref-for-serialized-tt-configuration">serialized-tt-configuration</a>
|
3103 | 3103 | <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="serialized-tt-configuration">serialized-tt-configuration</dfn> = ( <a data-link-type="dfn" href="#tt-expression" id="ref-for-tt-expression">tt-expression</a> *( <a href="https://w3c.github.io/webappsec-csp/#grammardef-required-ascii-whitespace">required-ascii-whitespace</a> <a data-link-type="dfn" href="#tt-expression" id="ref-for-tt-expression①">tt-expression</a> ) )
|
3104 |
| -<dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tt-expression">tt-expression</dfn> = <a data-link-type="dfn" href="#tt-policy-name" id="ref-for-tt-policy-name">tt-policy-name</a> / <a data-link-type="dfn" href="#tt-keyword" id="ref-for-tt-keyword">tt-keyword</a> |
| 3104 | +<dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tt-expression">tt-expression</dfn> = <a data-link-type="dfn" href="#tt-policy-name" id="ref-for-tt-policy-name">tt-policy-name</a> / <a data-link-type="dfn" href="#tt-keyword" id="ref-for-tt-keyword">tt-keyword</a> / <a data-link-type="dfn" href="#tt-wildcard" id="ref-for-tt-wildcard">tt-wildcard</a> |
| 3105 | +<dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tt-wildcard">tt-wildcard</dfn> = "*" |
3105 | 3106 | <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tt-policy-name">tt-policy-name</dfn> = 1*( <a href="https://tools.ietf.org/html/rfc5234#appendix-B.1">ALPHA</a> / <a href="https://tools.ietf.org/html/rfc5234#appendix-B.1">DIGIT</a> / "-" / "#" / "=" / "_" / "/" / "@" / "." / "%")
|
3106 | 3107 | <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tt-keyword">tt-keyword</dfn> = "'allow-duplicates'"
|
3107 | 3108 | </pre>
|
@@ -3186,7 +3187,8 @@ <h4 class="heading settled" data-level="4.5.4" id="should-block-create-policy"><
|
3186 | 3187 | duplicated names.</p>
|
3187 | 3188 | <li data-md>
|
3188 | 3189 | <p>If <var>directive</var>’s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑤">value</a> does not contain a <a data-link-type="dfn" href="#tt-policy-name" id="ref-for-tt-policy-name①">tt-policy-name</a>,
|
3189 |
| -which value is <var>policyName</var>, set <var>createViolation</var> to true.</p> |
| 3190 | +which value is <var>policyName</var>, and <var>directive</var>’s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑥">value</a> does not contain a <a data-link-type="dfn" href="#tt-wildcard" id="ref-for-tt-wildcard①">tt-wildcard</a>, set <var>createViolation</var> to true.</p> |
| 3191 | + <p class="note" role="note"><span>Note:</span> <code>trusted-types *</code> allows authors to create policies with any unique names. To allow for multiple policies with the same name, use <code>trusted-types * 'allow-duplicates'</code> or don’t set the <code>trusted-types</code> directive at all.</p> |
3190 | 3192 | <li data-md>
|
3191 | 3193 | <p>If <var>createViolation</var> is false, skip to the next <var>policy</var>.</p>
|
3192 | 3194 | <li data-md>
|
@@ -3266,9 +3268,9 @@ <h4 class="heading settled" data-level="4.5.6" id="csp-eval"><span class="secno"
|
3266 | 3268 | <p>Let <var>source-list</var> be <code>null</code>.</p>
|
3267 | 3269 | <li data-md>
|
3268 | 3270 | <p>If <var>policy</var> contains a <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directives" id="ref-for-directives⑧">directive</a> whose <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-name" id="ref-for-directive-name③">name</a> is "<code>script-src</code>", then
|
3269 |
| -set <var>source-list</var> to that <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directives" id="ref-for-directives⑨">directive</a>'s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑥">value</a>.</p> |
| 3271 | +set <var>source-list</var> to that <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directives" id="ref-for-directives⑨">directive</a>'s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑦">value</a>.</p> |
3270 | 3272 | <p>Otherwise if <var>policy</var> contains a <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directives" id="ref-for-directives①⓪">directive</a> whose <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-name" id="ref-for-directive-name④">name</a> is
|
3271 |
| -"<code>default-src</code>", then set <var>source-list</var> to that directive’s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑦">value</a>.</p> |
| 3273 | +"<code>default-src</code>", then set <var>source-list</var> to that directive’s <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#directive-value" id="ref-for-directive-value⑧">value</a>.</p> |
3272 | 3274 | <li data-md>
|
3273 | 3275 | <p>If <var>source-list</var> is not <code>null</code>, and does not contain a <a data-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#source-expression" id="ref-for-source-expression">source expression</a> which is
|
3274 | 3276 | an <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive">ASCII case-insensitive</a> match for the string "<a data-link-type="grammar" href="https://w3c.github.io/webappsec-csp/#grammardef-unsafe-eval" id="ref-for-grammardef-unsafe-eval"><code>'unsafe-eval'</code></a>" then:</p>
|
@@ -3539,6 +3541,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
|
3539 | 3541 | <li><a href="#tt-expression">tt-expression</a><span>, in §4.5.2</span>
|
3540 | 3542 | <li><a href="#tt-keyword">tt-keyword</a><span>, in §4.5.2</span>
|
3541 | 3543 | <li><a href="#tt-policy-name">tt-policy-name</a><span>, in §4.5.2</span>
|
| 3544 | + <li><a href="#tt-wildcard">tt-wildcard</a><span>, in §4.5.2</span> |
3542 | 3545 | <li><a href="#dom-document-write">write()</a><span>, in §4.1.2</span>
|
3543 | 3546 | <li><a href="#dom-document-writeln">writeln()</a><span>, in §4.1.2</span>
|
3544 | 3547 | <li><a href="#dom-document-writeln">writeln(...text)</a><span>, in §4.1.2</span>
|
@@ -3657,8 +3660,8 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
|
3657 | 3660 | <li><a href="#ref-for-directive-value">4.5.1. require-trusted-types-for directive</a>
|
3658 | 3661 | <li><a href="#ref-for-directive-value①">4.5.2. trusted-types directive</a> <a href="#ref-for-directive-value②">(2)</a>
|
3659 | 3662 | <li><a href="#ref-for-directive-value③">4.5.3. Should sink type mismatch violation be blocked by Content Security Policy?</a>
|
3660 |
| - <li><a href="#ref-for-directive-value④">4.5.4. Should Trusted Type policy creation be blocked by Content Security Policy?</a> <a href="#ref-for-directive-value⑤">(2)</a> |
3661 |
| - <li><a href="#ref-for-directive-value⑥">4.5.6. Support for eval(TrustedScript)</a> <a href="#ref-for-directive-value⑦">(2)</a> |
| 3663 | + <li><a href="#ref-for-directive-value④">4.5.4. Should Trusted Type policy creation be blocked by Content Security Policy?</a> <a href="#ref-for-directive-value⑤">(2)</a> <a href="#ref-for-directive-value⑥">(3)</a> |
| 3664 | + <li><a href="#ref-for-directive-value⑦">4.5.6. Support for eval(TrustedScript)</a> <a href="#ref-for-directive-value⑧">(2)</a> |
3662 | 3665 | </ul>
|
3663 | 3666 | </aside>
|
3664 | 3667 | <aside class="dfn-panel" data-for="term-for-violation">
|
@@ -4864,6 +4867,13 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
|
4864 | 4867 | <li><a href="#ref-for-tt-expression">4.5.2. trusted-types directive</a> <a href="#ref-for-tt-expression①">(2)</a>
|
4865 | 4868 | </ul>
|
4866 | 4869 | </aside>
|
| 4870 | + <aside class="dfn-panel" data-for="tt-wildcard"> |
| 4871 | + <b><a href="#tt-wildcard">#tt-wildcard</a></b><b>Referenced in:</b> |
| 4872 | + <ul> |
| 4873 | + <li><a href="#ref-for-tt-wildcard">4.5.2. trusted-types directive</a> |
| 4874 | + <li><a href="#ref-for-tt-wildcard①">4.5.4. Should Trusted Type policy creation be blocked by Content Security Policy?</a> |
| 4875 | + </ul> |
| 4876 | + </aside> |
4867 | 4877 | <aside class="dfn-panel" data-for="tt-policy-name">
|
4868 | 4878 | <b><a href="#tt-policy-name">#tt-policy-name</a></b><b>Referenced in:</b>
|
4869 | 4879 | <ul>
|
|
0 commit comments