-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove inline scripts #4031
Comments
Can you close duplicates of this? |
There is an orm linked issue containing more scripts that were moved from orm to admin |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
How about to keep BC just utilize csp nonce functionality? I.e. utilize <script nonce="{{ csp_nonce('script') }}"> from nelmio security bundle and fallback to own one? Also - inline scripts/styles are not the only ones that should be taken care of. I.e. highly secure setups require also no unsafe-inline usage which means that style="width: XXXpx" tags are also forbidden. |
Closing in favor of #7158 |
For many reasons, we should remove all scripts from the templates. We could replace them with data listerns like in the page bundle: sonata-project/SonataPageBundle#562.
General
Inline scripts couldn't be cached and would pollute the html output.
Security
There is also a security bundle which introduces some interesting information about security. You could completly disable inline script via a http header to reduce possible XSS attacks.
For more information: http://www.w3.org/TR/CSP/
Todo
The following files contains inline scripts and should be removed in the next major release, because this is a BC break.
Refs #2911
The text was updated successfully, but these errors were encountered: