Origin policy: update CSP parsing to match the latest spec
This updates the parsing of the feature policy parts of the origin policy manifest to mostly match the latest spec draft at https://wicg.github.io/origin-policy/, in particular https://wicg.github.io/origin-policy/#parsing. That is, it moves away from "content-security-policy": [{ "policy": "string", "report-only": boolean }] to "content_security": { "policies": ["...CSP strings"], "policies_report_only": ["...CSP strings"] }. Additionally, it removes the failure on parsing errors, as those are no longer in the spec. This does not yet properly parse the CSP string as a CSP; instead it still treats it as a header (so, commas are allowed inside). A failing test is added for that case, which will be addressed in a followup CL. Bug: 751996 Change-Id: I8d14815b486afd4a5622bc4b25874c81418fd38c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977148 Commit-Queue: Domenic Denicola <domenic@chromium.org> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/master@{#732666}
Showing
This diff is collapsed.
Please register or sign in to comment