Closed rezaduty closed 4 years ago
We can only prevent this by using some type of wrapper/checker because this is not library problem more JavaMailAPI which handles sending email. I'm aware of XSS but inline HTML XSS I'm not sure how to fix that. I'll have a look and post a commit. Thank you for letting me know @rezaduty .
Doing careful consideration, I figured that this should not be part of the library it self. It's on email client to parse email body with potential javascript in it.
Although I did add isJavascriptEnabled
, to handle that javascript
parsing, problem is that it only allows HTML tags. So inline CSS is not supported. Even doing CSS in <style>
can cause parsing problem. E-mail will be sent successfully but HTML layout of email will be potentially distorted.
Describe the bug inject
<h1 onload=alert(document.cookie)>Hello World!</h1>
and trigged on load element and get cookiesDesktop:
Smartphone:
Additional context