-
Notifications
You must be signed in to change notification settings - Fork 263
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
Improve html message rendering #4003
Conversation
I tested with real world newsletter/notification emails in my personal mail account and most of them are displayed correctly now. More testing is appreciated. |
http://htmlpurifier.org/live/configdoc/plain.html
👍
👍 I'm fine with slightly invalid HTML. The browsers should be able to handle it. |
So I'm generally for this change, but we should be careful with the mime types and only allow a few safe ones that are used for common image types. |
/backport to stable1.6 |
606d236
to
175240a
Compare
Now I'm not sure if we actually want to allow this. Did you see legit emails that use svg? There's some security implications with those. I'm checking with @rullzer if allowing them is OK or not. I've found https://css-tricks.com/a-guide-on-svg-support-in-email/ on this tipic and it sounds like we'd not be the only client to not render the SVGs. |
The notifications sent by the nextcloud server contain svgs. Turns out that svgs are a security threat because they may contain scripts. If we really want to proxy svgs we should sanitize them. |
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
175240a
to
71931bc
Compare
Oops. With the insights from https://css-tricks.com/a-guide-on-svg-support-in-email/ it sounds like we should fix that in server.
Indeed. I see you updated your branch already. Let's skip the potentially dangerous SVG part for now. We can think about sanitization in a follow-up step. |
Fixes #3076
Proxy Content-Type header (fallback toapplication/octet-stream
). Some browsers (e.g. chromium based) refuse to display svgs in img elements unless they are served with the correct Content-Type header.EDIT: 2. is not secure