Skip to content

Cancel navigation on invalid required CSP attribute#11

Open
antosart wants to merge 1 commit intow3c:mainfrom
antosart:fix-inherited-csp-context
Open

Cancel navigation on invalid required CSP attribute#11
antosart wants to merge 1 commit intow3c:mainfrom
antosart:fix-inherited-csp-context

Conversation

@antosart
Copy link
Copy Markdown
Member

If the document A includes <iframe src="B" csp="some-policy">, and B includes <iframe src="C" csp="some-other-policy"> and some-policy does not subsume some-other-policy, right now CSPEE ignores some-other-policy and required from C to comply with some-policy. This seems dangerous since CSPEE ignores then the requirements from B. This changes tries to fix that by canceling the navigation in such a case.

@antosart
Copy link
Copy Markdown
Member Author

Actually, I believe this is still not optimal since it makes it very difficult for the owner of B to require some CSP from C in case B is to be embedded in several, different documents that could in principle require different CSPs. In that case, the only possibility for B would be to generate the csp attr for C after parsing the Sec-Required-CSP header, being sure to add that to the CSPs B wants to require from C. In short terms, there is no easy way for B to say: I just want to require from C this additional CSP, and I am fine with all other requirements coming from A, whatever they are.

Base automatically changed from master to main February 16, 2021 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant