Description[ServiceWorker] CSP support for ServiceWorker environment.
According to the CSP spec, we have to check the Content-Security-Policy HTTP response header of the ServiceWorker script.
https://w3c.github.io/webappsec/specs/content-security-policy/#processing-model-workers
For example:
When "Content-Security-Policy: script-src 'self'" is set, "importScripts('https://othersite/'); must fail.
When "Content-Security-Policy: connect-src 'self'" is set, "fetch('https://othersite/data'); must fail.
The changes in WebEmbeddedWorkerImpl.cpp introduce CSP check for ServiceWorker environment.
The changes in FetchManager.cpp introduce CSP check for fech API.
We need to set the CSP not only to the ServiceWorkerGlobalScope but also to the shadow page's document.
The CSP in the shadow page's document will be used while handling the redirect responses in DocumentThreadableLoader::isAllowedByContentSecurityPolicy()
BUG=432069
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185630
Patch Set 1 : #
Total comments: 6
Patch Set 2 : else if #
Total comments: 8
Patch Set 3 : rebase #Patch Set 4 : add FIXME #
Messages
Total messages: 22 (7 generated)
|