-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support CSP nonces in message frames so that unsafe-inline isn't required. #6281
Comments
Yes, it could be done this way. We're open for pull requests. |
Hi gang, is there any movement on this? I've recently been looking at having a good Content-Security-Policy header on my server, yet Roundcube is one of the big ticket items for me that does not work without 'unsafe-inline' and 'unsafe-eval'. Cheers. |
Is that on the 4.x roadmap? |
Any news on this? |
Using nonces isn't really a problem for all the inline <script tags. This can be done server side. So its possible to remove unsafe-inline from CSP header. The only problem are this nasty inline event handlers. Its not that easy to remove this and replace them with some alternative. I tryed it today but i failed. |
@Offerel If attaching event listeners to each element is too much trouble, you could set passive |
Trying for a much more narrowly scoped version of #6202.
The message preview and message content frames each have one big inline script at the top. Adding a
nonce
attribute to this, and aContent-Security-Policy
header with said nonce should be fairly straightforward.The tricky bit is that there are event handlers added in-line to various elements on the page, mainly via
<roundcube:button command="whatever" ... />
, though there's anonmouseover
defined for the subject line in the default theme.Perhaps the inline event handlers could be replaced with
data-*
attributes that an otherwise allowed script can use to make the requiredaddEventListener
calls?The text was updated successfully, but these errors were encountered: