Skip to content

Comments

Fix activateScriptElement to set the CSP nonce correctly#1503

Open
mildred wants to merge 1 commit intohotwired:mainfrom
mildred:mildred-csp-nonce-fix
Open

Fix activateScriptElement to set the CSP nonce correctly#1503
mildred wants to merge 1 commit intohotwired:mainfrom
mildred:mildred-csp-nonce-fix

Conversation

@mildred
Copy link

@mildred mildred commented Feb 11, 2026

The activateScriptElement function did not correctly set the CSP nonce on occasions. When the element to duplicate has been stripped from its CSP nonce in elementWithoutNonce, the nonce attribute is set to an empty string and would overwrite the correct nonce.

Fix #1502

The `activateScriptElement` function did not correctly set the CSP nonce on occasions. When the element to duplicate has been stripped from its CSP nonce in `elementWithoutNonce`, the nonce attribute is set to an empty string and would overwrite the correct nonce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Function activateScriptElement overwrite CSP nonce with empty string causing violation

1 participant