Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support#7380
Merged
mitchellhenke merged 4 commits intomainfrom Nov 22, 2022
Conversation
…l Service (SES) support changelog: Bug Fixes, Email, Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Merged
mitchellhenke
pushed a commit
that referenced
this pull request
Nov 23, 2022
…l Service (SES) support (#7380) * Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support changelog: Bug Fixes, Email, Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support * Update app/validators/form_email_validator.rb Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * rescue email parsing exception * add domain validation to AddUserEmailForm Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
This was referenced Nov 29, 2022
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary of changes
We had a few unhandled exceptions from SES when trying to send to non-ASCII domain names (NR link) with the exception
Aws::SES::Errors::InvalidParameterValue: Domain contains illegal character.SES documentation confirms this:
I tested non-ASCII in the local part of the email address as well as the domain part. I tested both, and was able to receive emails to addresses with non-ASCII characters in the local part, but received the same error with non-ASCII characters in the domain. Due to that, this PR only adds ASCII validation to the domain for now.