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

Initialization incompatible with require-trusted-types-for 'script' content security policy #103

Open
antifuchs opened this issue Jul 29, 2021 · 1 comment

Comments

@antifuchs
Copy link

The script tag generated in

o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
does something that we'd like to forbid on our page, in order to properly protect our users from injected javascript: It concatenates untrusted strings.

Ideally, if trusted types are supported in a browser, the library should generate a TrustedScriptURL (or, better - let users pass one) and assign that unchanged.

@antifuchs
Copy link
Author

antifuchs commented Jul 29, 2021

I think this snippet as linked would perfectly support usage with trusted types, if it didn't insist on prepending "https://" to the data provided.

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

No branches or pull requests

1 participant