diff --git a/index.html b/index.html index bd7c042fa4..e23a2b0e33 100644 --- a/index.html +++ b/index.html @@ -1870,9 +1870,19 @@
The frame-src
directive, which was deprecated in CSP Level
- 2, has been undeprecated, and a worker-src
directive has been added.
- Both continue to defer to child-src
if not present (which defers to default-src
in turn), but child-src
is now deprecated.
The child-src
model has been substantially altered:
The frame-src
directive, which was deprecated in CSP Level
+ 2, has been undeprecated, but continues to defer to child-src
if
+ not present (which defers to default-src
in turn).
A worker-src
directive has been added, deferring to script-src
if not present (which likewise defers to default-src
in turn).
child-src
is now deprecated.
Dedicated workers now always inherit their creator’s policy.
+This still might not be the right model. <https://github.com/w3c/webappsec-csp/issues/146>
The URL matching algorithm now treats insecure schemes and ports as @@ -2492,7 +2502,7 @@
If response’s url’s scheme is a local scheme:
+If response’s url’s scheme is a local scheme, or if global is a DedicatedWorkerGlobalScope
:
Let documents be an empty list.
@@ -2513,7 +2523,11 @@about:
, and this algorithm will
therefore alias the embedding document’s policies for an iframe srcdoc
Document
.
For each policy in response’s CSP list, insert policy into global’s CSP list.
+If global is a SharedWorkerGlobalScope
or ServiceWorkerGlobalScope
:
Given an Element
(element), a string (type), and a string (source)
@@ -3054,7 +3068,7 @@
Let name be the result of executing §6.6.1.11 Get the effective directive for request on request.
If name is not frame-src
or worker-src
, return "Allowed
".
If name is not frame-src
, return "Allowed
".
If policy contains a directive whose name is name, return "Allowed
"
Let name be the result of executing §6.6.1.11 Get the effective directive for request on request.
If name is not frame-src
or worker-src
, return "Allowed
".
If name is not frame-src
, return "Allowed
".
If policy contains a directive whose name is name, return "Allowed
"
If policy contains a directive whose name is name, return "Allowed
".
If name is "frame-src
" or "worker-src
", and policy contains a directive whose name is "child-src
",
- return "Allowed
".
Note: It would be lovely to remove this special case. Perhaps "effective
- directive" could return "child-src
" and that could delegate out in the
- same way this algorithm does?
If name is "frame-src
", and policy contains a directive whose name is "child-src
", return "Allowed
".
If name is "worker-src
", and policy contains a directive whose name is "script-src
", return "Allowed
".
Otherwise, return the result of executing the pre-request check for the directive whose name is name on request and policy, using +
Otherwise, return the result of executing the pre-request check for the directive whose name is name on request and policy, using this directive’s value for the comparison.
default-src
Post-request check If name is null
, return "Allowed
".
If policy contains a directive whose name is name, return "Allowed
".
If policy contains a directive whose name is name, return "Allowed
".
If name is "frame-src
" or "worker-src
", and policy contains a directive whose name is "child-src
",
- return "Allowed
".
Note: It would be lovely to remove this special case. Perhaps "effective
- directive" could return "child-src
" and that could delegate out in the
- same way this algorithm does?
If name is "frame-src
", and policy contains a directive whose name is "child-src
", return "Allowed
".
Otherwise, return the result of executing the post-request check for the directive whose name is name on request, response, and policy, using this directive’s value for the +
If name is "worker-src
", and policy contains a directive whose name is "script-src
", return "Allowed
".
Otherwise, return the result of executing the post-request check for the directive whose name is name on request, response, and policy, using this directive’s value for the comparison.
font-src
Assert: policy is unused.
+If the result of executing §6.6.1.11 Get the effective directive for request on request is "worker-src
", and policy contains a directive whose name is "worker-src
", return "Allowed
".
Note: If worker-src
is present, we’ll defer to it when handling worker requests.
If request’s type is "script
", and its destination is "subresource
":
Assert: policy is unused.
+If the result of executing §6.6.1.11 Get the effective directive for request on request is "worker-src
", and policy contains a directive whose name is "worker-src
", return "Allowed
".
Note: If worker-src
is present, we’ll defer to it when handling worker requests.
If request’s type is "script
", and its destination is "subresource
":
Let source list be null
.
If a directive whose name is +
If a directive whose name is
"base-uri
" is present in policy’s directive
- set, set source list to that directive’s value.
If source list is null
, skip to the next policy.
If policy contains a directive (directive) whose name is plugin-types
:
If policy contains a directive (directive) whose name is plugin-types
:
Let type be "application/x-java-applet
" if plugin element is an applet
element, or plugin element’s type
attribute’s
@@ -4247,7 +4259,7 @@
Given a request (request) and a policy (policy), this
- algorithm returns the violated directive if the request violates the
+ algorithm returns the violated directive if the request violates the
policy, and "Does Not Violate
" otherwise.
Note: This is generally used in directives' pre-request check algorithms to verify that a given request is reasonable.
+Note: This is generally used in directives' pre-request check algorithms to verify that a given request is reasonable.
Given a request (request), and a source list (source list), this algorithm returns the result of executing §6.6.1.5 Does url match source list in origin with redirect count? on response’s url, source list, request’s origin, and request’s redirect count.
-Note: This is generally used in directives' post-request check algorithms to verify that a given response is reasonable.
+Note: This is generally used in directives' post-request check algorithms to verify that a given response is reasonable.
Given a URL
(url), a source list (source list), an origin (origin), and a number (redirect count), this
algorithm returns "Matches
" if the URL matches one or more source
@@ -4524,7 +4536,7 @@
Each fetch directive controls a specific type of request. Given
- a request (request), the following algorithm returns either null
or the name of the request’s effective directive:
null
or the name of the request’s effective directive:
Switch on request’s type, and execute @@ -5400,7 +5412,9 @@