Conversation
Member
oschwald
commented
Jun 9, 2025
- Do not use commons-validator for domain validation
- Replace commons-validator email validation
- Remove commons-validator as a dependency
This isn't quite as strict, but it is a good enough "looks like an email" check for this purpose.
horgh
requested changes
Jun 9, 2025
| } | ||
|
|
||
| if (domain.endsWith(".")) { | ||
| domain = domain.substring(0, domain.length() - 1); |
Contributor
There was a problem hiding this comment.
Would we want to use asciiDomain on these two lines?
Member
Author
There was a problem hiding this comment.
Good catch. I fixed this and the other issue.
| return false; | ||
| } | ||
|
|
||
| // RFC 5321 the forward path limits the mailbox to 254 characters |
Contributor
There was a problem hiding this comment.
Are we missing a word here in referring to the RFC?
I do this by getting rid of the asciiDomain variable as that just makes it easier to use the wrong one.
horgh
approved these changes
Jun 9, 2025
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.