Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing response's CSP type mismatch #685

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

antosart
Copy link
Member

@antosart antosart commented Oct 14, 2024

This fixes the "Parse response’s Content Security Policies" algorithm, which wanted to use the result of extracting header list values, a list of byte sequences, as input for parsing, which takes either a byte sequence or a string.

As it turns out, extracting header list values already takes care of splitting the header value on commas and returning a list (provided that the ABNF grammar of the header specifies so, which the Content-Security-Policy grammar does), so the CSP spec can be further simplified by removing the part handling commas in header values.

This fixes #684.


Preview | Diff

Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit.

@antosart antosart merged commit b33a9a2 into w3c:main Oct 14, 2024
2 checks passed
@antosart antosart deleted the fix-parsing branch October 14, 2024 08:39
github-actions bot added a commit that referenced this pull request Oct 14, 2024
SHA: b33a9a2
Reason: push, by antosart

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines +539 to +540
<a abstract-op lt="parse a serialized CSP list">parsing</a> |token|, with a
[=policy/source=] of "`header`", and a [=policy/disposition=] of "`enforce`".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse a serialized CSP list was deleted, this does not link to anything anymore.

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.

Parse response’s CSPs parsing header list values type mismatch
3 participants