-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add nonce as props for inline style #48
Comments
hey @acreations I don't get exactly what this issue is about and how to reproduce. can you clarify on that? |
Hey! Content-Security-Policies are an essential tool to protect users from bad code being executed on the users device. If you have a basic content security policy, like
This is due to the following code. which programatically adds styles inline.
Instead the styles should be in a separate stylesheet and the script should only set the styles via css class names as far as I understand. Do you understand what I mean? would be great if we could fix this as this make the adoption of this library very difficult when working with CSPs. |
@guilhermerodz Can you reproduce this? Are you open for contributions regarding this issue? 😃 |
w3c/webappsec-csp#399 related issue |
I think reading the current nonce from the script via |
Now I get it. I'll see what we can do about it. Perhaps Have you tried it? @paulschuetz |
Not yet, should I come up with a POC? |
seems to work, see https://github.com/paulschuetz/csp-inline-styles-poc |
Is your feature request related to a problem? Please describe.
Im using a nonce as a CSP rules for inline styles and when running this library CSP rules are complaining
Describe the solution you'd like
Not sure if it is the best approach but could we have nonce as props to OTPInput and added when having inline style (on row 174 in input.tsx file)
The text was updated successfully, but these errors were encountered: