-
-
Notifications
You must be signed in to change notification settings - Fork 50
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(webapp): add missing hashes to CSP #794
Conversation
8f6f485
to
a9dd5ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can add these. To avoid future confusion, would you mind adding comments to explain what these hashes are about? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Now, unfortunately, the hashes have changed yesterday (see vitejs/vite@4033a32).
How are we going to go about this? -- If they get outdated, it's about as good as not having them at all.
The commit is part of vite v5 which is not released yet. |
Mh. Nevertheless, the code comment linking to the source is not correct (it lists the new hashes, not the ones that are in this PR). |
So, can you fix the comments such that the point at the source of the hashes? -- If we don't do this, anyone looking at the code some time in the future will be confused. |
Add inline script hashes for `@vitejs/plugin-legacy`: Warning: the hashes may change with newer releases! Add the corresponding hashes to your script-src list: sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E= sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo= sha256-4y/gEB2/KIwZFTfNqwXJq4olzvmQ0S214m9jwKgNXoc= sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc= Source: https://github.com/vitejs/vite/tree/v4/packages/plugin-legacy#content-security-policy
d5507bb
to
ef55495
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, lgtm!
Add inline script hashes for
@vitejs/plugin-legacy
:Add the corresponding hashes to your script-src list:
Source:
https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#content-security-policy
Reference
fixes #788