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

Does "Is Element Nonceable" apply to non-inline scripts? #635

Open
evilpie opened this issue Jan 12, 2024 · 1 comment
Open

Does "Is Element Nonceable" apply to non-inline scripts? #635

evilpie opened this issue Jan 12, 2024 · 1 comment

Comments

@evilpie
Copy link
Contributor

evilpie commented Jan 12, 2024

I don't see any reason why 6.7.3.1. Is element nonceable? shouldn't apply to non-inline scripts/styles (i.e. <script src="foo.js" nonce="bar">). However the algorithm doesn't seem to be called from Script directives pre-request check, instead that algorithm directly uses § 6.7.2.3 Does nonce match source list?. It is explicitly used from § 6.7.3.3 Does element match source list for type and source?, called by the various inline checks.

nonce-enforce-blocked.html seems to expect the check to apply to non-inline scripts.

@evilpie
Copy link
Contributor Author

evilpie commented Jan 12, 2024

Post-post-clarity strikes again: I guess for non-inline scripts, we are operating on requests, so the "Is element nonceable?" check needs to happen before the request is created. Probably somewhere in HTML's prepare the script element, which currently sets the cryptographic nonce. So this is maybe just missing?

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

No branches or pull requests

1 participant