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
Emails containing specific content cannot be send using SG, due to content validation.
I cannot find any documentation of this "feature".
Please narrow validation and document it or remove it at all.
Steps to Reproduce
Try to send email with following content: SG..
Result: IllegalArgumentException: Found a Forbidden Pattern in the content of the email
Technical details:
This error it because of content validation using regexp .*SG\.[a-zA-Z0-9(-|_)]*\.[a-zA-Z0-9(-|_)]*.*, which is so wide. AFAIU this is to prevent leakage of SG API KEYs, but it block legal content to be sent.
Hi, we are having the same problem. We are using several templates containing SG. text and this verify method is rejecting all the mails using these templates.
Activity
thinkingserious commentedon Nov 18, 2018
Thanks for bringing this to our attention @vanta, I've added this to our backlog for a fix and labeled it for outside contribution.
With Best Regards,
Elmer
jalp commentedon Dec 13, 2018
Hi, we are having the same problem. We are using several templates containing
SG.text and this verify method is rejecting all the mails using these templates.Do you have any estimation time to solve it?
Many thanks in advance!
vanta commentedon Feb 24, 2019
@thinkingserious Do you need a PR for it?
thinkingserious commentedon Nov 20, 2019
Thanks @vanta!!
My suggestion would be to make that call optional as well.
A PR would help move this issue up the backlog as well as +1 and/or comments.
With best regards,
Elmer
childish-sambino commentedon Jul 24, 2020
I'm just gonna rip this code out. We don't do this in any of the other libraries and it only guards against a specific secret. PR coming soon.