Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSP: Use parsed policies for initializing Workers/Worklets
Workers/Worklet need to take into account Content Security Policies, which are sometimes inherited by the creating document and sometimes parsed from the HTTP headers directly. At the moment, we are storing and sending around the raw CSP policies. For example, when a Worker inherits the CSPs from the creating document, we send the raw strings, which were just parsed in the document, to the Worker, where they are parsed a second time. Not only this multiple parsing of the same policy is superfluous and can be avoided. It can also create inconsistencies (see the failing WP test content-security-policy/sandbox/meta-element.sub.html) This change replaces the raw policies with the parsed CSP types, avoids multiple parsing, and fixes that test. Bug: 1021462,1149272 Change-Id: Ib431253419226d6642a086923620b3aba34feb43 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636314 Commit-Queue: Antonio Sartori <[email protected]> Reviewed-by: Mike West <[email protected]> Reviewed-by: Hiroki Nakagawa <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Cr-Commit-Position: refs/heads/master@{#848069}
- Loading branch information