You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that for recipient variables, (at least for HTML e-mails), you can send HTML tags and they will be rendered appropriately in the e-mail. I guess this kind of makes sense why it isn't escaped on this module nor mailguns end, it could be you do want HTML variables...so then it be our responsibility escaping HTML tags, right? I guess that's fine. But I think the module could benefit from some flag to automatically do this for us or something.
In a situation, if we are sending e-mails from a databases where the first name is stored, a malicious user can have their name as <a href="badwebsite.com">My Name</a> and it will be rendered as a link tag on the e-mail.
Example (this is examples/send-email.js made it simple and added an HTML tag for the recipient variable):
I noticed that for recipient variables, (at least for HTML e-mails), you can send HTML tags and they will be rendered appropriately in the e-mail. I guess this kind of makes sense why it isn't escaped on this module nor mailguns end, it could be you do want HTML variables...so then it be our responsibility escaping HTML tags, right? I guess that's fine. But I think the module could benefit from some flag to automatically do this for us or something.
In a situation, if we are sending e-mails from a databases where the first name is stored, a malicious user can have their name as
<a href="badwebsite.com">My Name</a>
and it will be rendered as a link tag on the e-mail.Example (this is
examples/send-email.js
made it simple and added an HTML tag for the recipient variable):Result: "My Name" is a hyperlink
If this is something that we should be handling then so be it, but I think it should be documented somewhere. Pretty important stuff to know.
The text was updated successfully, but these errors were encountered: