From 48433dd7a9b0af01528647453a90729f47409d98 Mon Sep 17 00:00:00 2001
From: ryandel8834 §4.2.3 Should element’s inline type behavior be blocked by Content Security Policy?. This algorithm returns "
Allowed
" unless
otherwise specified.
An initialization, which takes a Document
or global object, a response, and a policy as
+
An initialization, which takes a Document
or global object, a response, and a policy as
arguments. This algorithm is executed during §4.2.1 Initialize a Document's CSP list,
and has no effect unless otherwise specified.
Matches
.
A violation represents an action or resource which goes against the - set of policy objects associated with a global object.
+ set of policy objects associated with a global object.Each violation has a global object, which - is the global object whose policy has been violated.
+ is the global object whose policy has been violated.Each violation has a url which is its global object’s URL
.
Each violation has a status which is a non-negative integer representing the HTTP status code of the resource for @@ -2026,7 +2026,7 @@
Given a global object (global), a policy (policy), and a +
Given a global object (global), a policy (policy), and a string (directive), the following algorithm creates a new violation object, and populates it with an initial set of data:
A policy is generally enforced upon a global object, but the +
A policy is generally enforced upon a global object, but the user agent needs to parse any policy - delivered via an HTTP response header field before any global object is created in order to handle directives that require knowledge of a response’s details. To that end:
+ delivered via an HTTP response header field before any global object is created in order to handle directives that require knowledge of a response’s details. To that end:A response has an associated CSP list which @@ -2299,12 +2299,12 @@
This concept is missing from W3C’s Workers. <https://github.com/w3c/html/issues/187>
A policy is enforced or monitored for a global object by inserting it into the global object’s CSP list.
+A policy is enforced or monitored for a global object by inserting it into the global object’s CSP list.
§4.2.2 Initialize a global object’s CSP list is called during the initialising a
new Document
object and run a worker algorithms in order to
bind a set of policy objects associated with a response to a
- newly created global object.
§4.2.3 Should element’s inline type behavior be blocked by Content Security Policy? is called during the prepare a script and update a style
block algorithms in order to determine whether or
not an inline script or style block is allowed to execute/render.
embed
, and applet
elements to determine whether they may trigger a fetch.
Note: Fetched plugin resources are handled in §4.1.4 Should response to request be blocked by Content Security Policy?.
-Upstream this to WHATWG and W3C.
+This hook is missing from WHATWG’s HTML. <https://github.com/whatwg/html/issues/1618>
+This hook is missing from W3C’s HTML. <https://github.com/w3c/html/issues/547>
Document
's CSP list
Given a Document
(document), and a response (response), the
@@ -2377,7 +2378,7 @@
CSP list
Given a global object (global), and a response (response), the user agent performs the following steps in order +
Given a global object (global), and a response (response), the user agent performs the following steps in order to initialize global’s CSP list:
For each policy in document’s global
+ For each policy in document’s global
object’s CSP list: Let result be " For each policy in element’s For each policy in element’s
Allowed
".Document
's global object’s CSP list:Document
's global object’s CSP list:
For each policy in document’s global object’s csp list:
+For each policy in document’s global object’s csp list:
Let source list be null
.
Does Not Match
":
Let violation be the result of executing §2.3.1 Create a violation object for global, policy, and directive on document’s global
+ Let violation be the result of executing §2.3.1 Create a violation object for global, policy, and directive on document’s global
object, policy, and " Set violation’s resource to "base-uri
".inline
".This directive’s initialization algorithm is
responsible for adjusting a
Document
's forced sandboxing flag set according to the sandbox
values present in its policies, as
follows:
Given a Document
or global object (context), a response (response), and a policy (policy):
Given a Document
or global object (context), a response (response), and a policy (policy):
If policy’s disposition is not "Enforce
", or context is not a Document
, then abort this algorithm.
This directive’s initialization algorithm is as follows:
-Given a Document
or global object (context), a response (response), and a policy (policy):
Given a Document
or global object (context), a response (response), and a policy (policy):
If context’s responsible browsing context has an opener browsing
@@ -4741,7 +4742,7 @@ fire
↵
<https://github.com/whatwg/html/issues/198>