Skip to content

Cannot send email with specific content #545

Closed

Description

@vanta

Issue Summary

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

  1. 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.

Activity

  1. added
    type: bug
    status: help wanted
    difficulty: easy
    on Nov 18, 2018
  2. thinkingserious commented on Nov 18, 2018

    @thinkingserious
    Contributor

    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

  3. jalp commented on Dec 13, 2018

    @jalp

    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!

  4. vanta commented on Feb 24, 2019

    @vanta
    Author

    @thinkingserious Do you need a PR for it?

  5. thinkingserious commented on Nov 20, 2019

    @thinkingserious
    Contributor

    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

  6. childish-sambino commented on Jul 24, 2020

    @childish-sambino
    Contributor

    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.

  7. added
    status: work in progress
    and removed
    status: help wanted
    on Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: easystatus: work in progresstype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions