@@ -25,9 +25,9 @@ At Risk: The [[#is-element-nonceable]] algorithm.
25
25
spec:dom; type:interface; text:Document
26
26
spec:html
27
27
type: dfn
28
- text: plugin document
29
28
text: fallback base url
30
29
text: duplicate-attribute
30
+ text: plugin
31
31
type: element
32
32
text: a
33
33
text: link
@@ -123,11 +123,12 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/
123
123
for: script
124
124
text: "parser-inserted"
125
125
text: origin; url: concept-origin
126
- text: browsing context; url: browsing-context
127
126
text: content security policy state; url: attr-meta-http-equiv-content-security-policy
128
127
text: create and initialize a new document object; url: initialise-the-document-object
129
128
text: initializing a new Document object; url: initialise-the-document-object
130
129
text: prepare the script element; url: prepare-the-script-element
130
+ text: container document; for: navigable; url: nav-container-document
131
+ text: CSP-derived sandboxing flags; url: csp-derived-sandboxing-flags
131
132
132
133
spec: INFRA; urlPrefix: https://infra.spec.whatwg.org/
133
134
type: grammar
@@ -625,7 +626,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
625
626
626
627
6. A <dfn for="directive" export>navigation response check</dfn> , which takes a
627
628
<a for="/">request</a> , a navigation type string ("`form-submission`" or "`other`"),
628
- a <a>response</a> , a <a>browsing context </a> , a check type string ("`source`"
629
+ a <a>response</a> , a <a>navigable </a> , a check type string ("`source`"
629
630
or "`response`"), and a <a for="/">policy</a> as arguments, and is executed during
630
631
[[#should-block-navigation-response]] . It returns "`Allowed`" unless otherwise specified.
631
632
@@ -1145,15 +1146,17 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
1145
1146
base URL</a> algorithm to ensure that the <{base/href}> attribute's value
1146
1147
is valid.
1147
1148
1148
- 10. [[#should-block-navigation-request]] is called during the <a>process a
1149
- navigate fetch </a> algorithm, and [[#should-block-navigation-response]]
1150
- is called during the <a>process a navigate response </a> algorithm to
1151
- apply directive's navigation checks, as well as inline checks for
1149
+ 10. [[#should-block-navigation-request]] is called during the <a spec=html>create
1150
+ navigation params by fetching </a> algorithm, and [[#should-block-navigation-response]]
1151
+ is called during the <a spec=html>attempt to populate the history entry's document </a>
1152
+ algorithm to apply directive's navigation checks, as well as inline checks for
1152
1153
navigations to `javascript:` URLs.
1153
1154
1154
1155
11. [[#run-global-object-csp-initialization]] is called during the <a>run a worker</a>
1155
1156
algorithm.
1156
1157
1158
+ 12. The <a>sandbox</a> directive is used to populate the <a>CSP-derived sandboxing flags</a> .
1159
+
1157
1160
<h4 id="run-document-csp-initialization" algorithm dfn export>
1158
1161
Run `CSP` initialization for a `Document`
1159
1162
</h4>
@@ -1310,7 +1313,7 @@ spec: WebRTC; urlPrefix: https://www.w3.org/TR/webrtc/
1310
1313
1311
1314
Given a <a for="/">request</a> (|navigation request|), a <a>response</a> |navigation
1312
1315
response|, a [=/CSP list=] |response CSP list|, a string (|type|, either
1313
- "`form-submission`" or "`other`"), and a <a>browsing context </a> |target|, this algorithm
1316
+ "`form-submission`" or "`other`"), and a <a>navigable </a> |target|, this algorithm
1314
1317
returns "`Blocked`" if the active policy blocks the navigation, and "`Allowed`"
1315
1318
otherwise:
1316
1319
@@ -1947,8 +1950,8 @@ this algorithm returns normally if compilation is allowed, and throws a
1947
1950
1948
1951
<h4 id="directive-child-src">`child-src`</h4>
1949
1952
1950
- The <dfn export>`child-src`</dfn> directive governs the creation of <a>nested browsing
1951
- contexts </a> (e.g. <{iframe}> and <{frame}> navigations) and Worker execution
1953
+ The <dfn export>`child-src`</dfn> directive governs the creation of <a>child
1954
+ navigables </a> (e.g. <{iframe}> and <{frame}> navigations) and Worker execution
1952
1955
contexts. The syntax for the directive's name and value is described by the
1953
1956
following ABNF:
1954
1957
@@ -2339,7 +2342,7 @@ this algorithm returns normally if compilation is allowed, and throws a
2339
2342
<h4 id="directive-frame-src">`frame-src`</h4>
2340
2343
2341
2344
The <dfn export>frame-src</dfn> directive restricts the URLs which may be loaded into
2342
- <a>nested browsing contexts </a> . The syntax for the directive's name and value
2345
+ <a>child navigables </a> . The syntax for the directive's name and value
2343
2346
is described by the following ABNF:
2344
2347
2345
2348
<pre>
@@ -2646,16 +2649,16 @@ this algorithm returns normally if compilation is allowed, and throws a
2646
2649
2647
2650
Note: The `object-src` directive acts upon any request made on behalf of
2648
2651
an <{object}> or <{embed}> element. This includes requests
2649
- which would populate the <a>nested browsing context </a> generated by the
2652
+ which would populate the <a>child navigable </a> generated by the
2650
2653
former two (also including navigations). This is true even when the data is
2651
2654
semantically equivalent to content which would otherwise be restricted by
2652
2655
another directive, such as an <{object}> element with a `text/html` MIME
2653
2656
type.
2654
2657
2655
- Note: When a plugin resource is navigated to directly (that is, as a <a>plugin document </a> in the
2656
- <a>top-level browsing context</a> or a <a>nested browsing context </a> , and not as an embedded
2658
+ Note: When a plugin resource is navigated to directly (that is, as a <a>plugin</a>
2659
+ inside a <a>navigable </a> , and not as an embedded
2657
2660
subresource via <{embed}> or <{object}> ), any <a for="/">policy</a> delivered along
2658
- with that resource will be applied to the <a>plugin document</a> . This means, for instance, that
2661
+ with that resource will be applied to the resulting <a>document</a> . This means, for instance, that
2659
2662
developers can prevent the execution of arbitrary resources as plugin content by delivering the
2660
2663
policy `object-src 'none' ` along with a response. Given plugins' power (and the
2661
2664
sometimes-interesting security model presented by Flash and others), this could mitigate the risk
@@ -3467,35 +3470,32 @@ this algorithm returns normally if compilation is allowed, and throws a
3467
3470
</h5>
3468
3471
3469
3472
This directive's <a for="directive">initialization</a> algorithm is
3470
- responsible for adjusting a {{Document}} 's <a>forced sandboxing flag set</a>
3471
- and for checking whether a worker is allowed to run according to the <a>`sandbox`</a>
3472
- values present in its policies as follows:
3473
+ responsible for checking whether a worker is allowed to run according
3474
+ to the <a>`sandbox`</a> values present in its policies as follows:
3475
+
3476
+ Note: The <a>sandbox</a> directive is also responsible for adjusting a
3477
+ {{Document}} 's <a for=Document>active sandboxing flag set</a> via the
3478
+ <a>CSP-derived sandboxing flags</a> .
3473
3479
3474
3480
Given a {{Document}} or <a for="/">global object</a> (|context|) and a <a for="/">policy</a>
3475
3481
(|policy|):
3476
3482
3477
3483
1. If |policy|'s <a for="policy">disposition</a> is not "`enforce`", or
3478
- |context| is a {{WorkletGlobalScope }} , then abort this algorithm.
3484
+ |context| is not a {{WorkerGlobalScope }} , then abort this algorithm.
3479
3485
3480
3486
2. Let |sandboxing flag set| be a new [=/sandboxing flag set=] .
3481
3487
3482
3488
3. <a>Parse a sandboxing directive</a> using this directive's <a
3483
3489
for="directive"> value</a> as the input, and |sandboxing flag set| as the output.
3484
3490
3485
- 4. If |context| is a {{WorkerGlobalScope}} :
3486
-
3487
- 1. If |sandboxing flag set| contains either the <a>sandboxed scripts browsing
3488
- context flag</a> or the <a>sandboxed origin browsing context flag</a> flags,
3489
- return "`Blocked`".
3491
+ 4. If |sandboxing flag set| contains either the <a>sandboxed scripts browsing context
3492
+ flag</a> or the <a>sandboxed origin browsing context flag</a> flags,
3493
+ return "`Blocked`".
3490
3494
3491
- Note: This will need to change if we allow Workers to be sandboxed into unique
3492
- origins, which seems like a pretty reasonable thing to do.
3495
+ Note: This will need to change if we allow Workers to be sandboxed into unique
3496
+ origins, which seems like a pretty reasonable thing to do.
3493
3497
3494
- 5. If |context| is a {{Document}} :
3495
-
3496
- 1. Set |context|'s <a>forced sandboxing flag set</a> to |sandboxing flag set|.
3497
-
3498
- 6. Return "`Allowed`".
3498
+ 5. Return "`Allowed`".
3499
3499
3500
3500
<h3 id="directives-navigation">
3501
3501
Navigation Directives
@@ -3564,7 +3564,7 @@ this algorithm returns normally if compilation is allowed, and throws a
3564
3564
3565
3565
Given a <a for="/">request</a> (|request|), a string |navigation type|
3566
3566
("`form-submission`" or "`other`"), a
3567
- <a>response</a> (|navigation response|) a <a>browsing context </a> (|target|),
3567
+ <a>response</a> (|navigation response|) a <a>navigable </a> (|target|),
3568
3568
a string |check type| ("`source`" or "`response`"), and a
3569
3569
<a for="/">policy</a> (|policy|) this algorithm returns "`Blocked`" if one or
3570
3570
more of the ancestors of |target| violate the `frame-ancestors` directive
@@ -3581,16 +3581,16 @@ this algorithm returns normally if compilation is allowed, and throws a
3581
3581
3. If |check type| is "`source`", return "`Allowed`".
3582
3582
3583
3583
Note: The 'frame-ancestors' <a>directive</a> is relevant only to the
3584
- |target| <a>browsing context </a> and it has no impact on the |request|'s
3584
+ |target| <a>navigable </a> and it has no impact on the |request|'s
3585
3585
context.
3586
3586
3587
- 4. If |target| is not a <a>nested browsing context </a> , return "`Allowed`".
3587
+ 4. If |target| is not a <a>child navigable </a> , return "`Allowed`".
3588
3588
3589
3589
5. Let |current| be |target|.
3590
3590
3591
- 6. While |current| is a <a>nested browsing context </a> :
3591
+ 6. While |current| is a <a>child navigable </a> :
3592
3592
3593
- 1. Let |document| be |current|'s [=browsing context /container document=] .
3593
+ 1. Let |document| be |current|'s [=navigable /container document=] .
3594
3594
3595
3595
2. Let |origin| be the result of executing the <a>URL parser</a> on the
3596
3596
<a lt="ASCII serialization of an origin">ASCII serialization</a>
@@ -3600,7 +3600,7 @@ this algorithm returns normally if compilation is allowed, and throws a
3600
3600
executed upon |origin|, this directive's <a for="directive">value</a> ,
3601
3601
|policy|'s [=policy/self-origin=] , and `0`, return "`Blocked`".
3602
3602
3603
- 4. Set |current| to |document|'s <a>browsing context </a> .
3603
+ 4. Set |current| to |document|'s <a>navigable </a> .
3604
3604
3605
3605
7. Return "`Allowed`".
3606
3606
</ol>
@@ -4712,7 +4712,7 @@ this algorithm returns normally if compilation is allowed, and throws a
4712
4712
</h3>
4713
4713
4714
4714
Documents loaded from <a>local schemes</a> will inherit a copy of the
4715
- policies in the <a> source browsing context</a> . The goal is to ensure that a page can't
4715
+ policies in the source document . The goal is to ensure that a page can't
4716
4716
bypass its policy by embedding a frame or opening a new window containing
4717
4717
content that is entirely under its control (`srcdoc` documents, `blob:` or `data:`
4718
4718
URLs, `about:blank` documents that can be manipulated via `document.write()`, etc).
@@ -4730,7 +4730,7 @@ this algorithm returns normally if compilation is allowed, and throws a
4730
4730
means that the new {{Document}} 's <a for="global object">CSP list</a> is a
4731
4731
snapshot of the relevant policies at its creation time. Modifications in the
4732
4732
<a for="global object">CSP list</a> of the new {{Document}} won't affect the
4733
- <a> source browsing context</a> 's <a for="global object">CSP list</a> or vice-versa.
4733
+ source {{Document}} 's <a for="global object">CSP list</a> or vice-versa.
4734
4734
4735
4735
<div class="example">
4736
4736
In the example below the image inside the iframe will not load because it is
0 commit comments