Skip to content

fix(cspNonce): don't overwrite existing nonce values#16415

Merged
patak-cat merged 2 commits into
vitejs:mainfrom
thebanjomatic:fix/cspNonce-duplicates
Apr 18, 2024
Merged

fix(cspNonce): don't overwrite existing nonce values#16415
patak-cat merged 2 commits into
vitejs:mainfrom
thebanjomatic:fix/cspNonce-duplicates

Conversation

@thebanjomatic
Copy link
Copy Markdown
Contributor

Fixes: #16414

Description

With this change, we now verify that the nonce attribute doesn't already exist on the tag prior to injecting the nonce value.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: html p3-minor-bug An edge case that only affects very specific usage (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

html.cspNonce option injects nonce values onto <script> tags that already contain a nonce

4 participants