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

Don't generate a nonce #829

Merged
merged 1 commit into from
May 30, 2023
Merged

Don't generate a nonce #829

merged 1 commit into from
May 30, 2023

Conversation

etiennebarrie
Copy link
Member

The need for a nonce was removed in 3ba21de.

Rails needs to generate the nonce to put in the headers, even if nothing uses it later.

Before:

$ curl localhost:3000/maintenance_tasks -sD - | grep Content-Security-Policy                                                                                                                                                           
Content-Security-Policy: base-uri 'none'; default-src 'self'; object-src 'none'; script-src 'sha256-NiHKryHWudRC2IteTqmY9v1VkaDUA/5jhgXkMTkgo2w='; frame-ancestors 'self'; block-all-mixed-content; style-src https://cdn.jsdelivr.net 'sha256-y9V0na/WU44EUNI/HDP7kZ7mfEci4PAOIjYOOan6JMA=' 'nonce-J0XZEshlYJMsNi23H63z0w=='

After:

$ curl localhost:3000/maintenance_tasks -sD - | grep Content-Security-Policy
Content-Security-Policy: base-uri 'none'; default-src 'self'; object-src 'none'; script-src 'sha256-NiHKryHWudRC2IteTqmY9v1VkaDUA/5jhgXkMTkgo2w='; frame-ancestors 'self'; block-all-mixed-content; style-src https://cdn.jsdelivr.net 'sha256-y9V0na/WU44EUNI/HDP7kZ7mfEci4PAOIjYOOan6JMA='

The need for a nonce was removed in
3ba21de
@etiennebarrie etiennebarrie merged commit 5d3294c into main May 30, 2023
@etiennebarrie etiennebarrie deleted the remove-nonce-generation branch May 30, 2023 13:40
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.

2 participants