Skip to content
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

fix: double quote escape names with special characters #353

Merged
merged 4 commits into from
Jul 4, 2019

Conversation

haleyrc
Copy link
Contributor

@haleyrc haleyrc commented Feb 22, 2019

Fixes

Fixes #352

Checklist

  • I confirm that the latest PR commit passes its Travis CI build.
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

  • Surrounds names passed to mail.NewEmail with double quotes to comply with RFC5322's section on special characters.

If you have questions, please send an email to Sendgrid, or file a Github Issue in this repository.

Ryan Haley added 4 commits February 22, 2019 15:58
In order to ensure compliance with the special characters clause in
RFC5322, it is safest to enclose all to names in double quotes. The
easiest place to do this is in NewEmail, but other tests need to be
updated to expect double-quoted names as well.
Only names which are not already double-quoted are modified.
Names that don't require quoting, either because they are already quoted
or because they don't contain any special characters shouldn't be
modified.
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Feb 22, 2019
@SendGridDX
Copy link

SendGridDX commented Feb 22, 2019

CLA assistant check
All committers have signed the CLA.

@haleyrc
Copy link
Contributor Author

haleyrc commented Feb 25, 2019

Failed checks seem to be related exclusively to invalid gometalinter options and my Github account not being correctly identified for the purposes of signing the CLA.

@thinkingserious thinkingserious added status: work in progress Twilio or the community is in the process of implementing difficulty: medium fix is medium in difficulty status: cla not signed and removed status: code review request requesting a community code review or review from Twilio labels Feb 26, 2019
@thinkingserious
Copy link
Contributor

Hello @haleyrc,

In order for us to merge/review this we need a signed CLA. If you add an email address to your GitHub profile and try again, all should be good. Thanks!

With Best Regards,

Elmer

@haleyrc
Copy link
Contributor Author

haleyrc commented Apr 11, 2019

@thinkingserious I've signed the CLA so hopefully everything is good to go from here.

@danehammer
Copy link

Could use this, just ran into this quietly 200ing and just not sending the email.

@thinkingserious thinkingserious merged commit d1c72cf into sendgrid:master Jul 4, 2019
@thinkingserious
Copy link
Contributor

Hello @haleyrc,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@thinkingserious thinkingserious changed the title Double quote escape names with special characters fix: double quote escape names with special characters Jan 17, 2020
childish-sambino pushed a commit that referenced this pull request Sep 23, 2020
The backend has been updated to properly handling names with special characters so the original "fix" is no longer needed.

Reverts #353
childish-sambino pushed a commit that referenced this pull request Sep 23, 2020
The backend has been updated to properly handling names with special characters so the original "fix" is no longer needed.

Reverts #353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: work in progress Twilio or the community is in the process of implementing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"To" names with commas cause mail delivery to fail
4 participants