Repository navigation
Allow single character host labels in email addresses - #2985
Open
OlegPhenomenon wants to merge 1 commit into
Open
OlegPhenomenon wants to merge 1 commit into
OlegPhenomenon wants to merge 1 commit into
Conversation
- Truemail email_pattern accepted only 2+ char host labels, rejecting smth@e.ee and smth@a.domain.ee - Allow 1 char labels at every level except TLD, which stays 2-63 letters Closes #2959
This branch has not been deployed
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.
Closes #2959
Problem
config.email_patterninconfig/initializers/truemail.rbrequired every host label to be at least 2 characters ([\p{L}0-9][\p{L}0-9-]{0,61}[\p{L}0-9]), so addresses likesmth@e.eeorsmth@a.domain.eefailed regex validation.Change
[\p{L}0-9](?:[\p{L}0-9-]{0,61}[\p{L}0-9])?: 1 to 63 chars, no leading/trailing hyphen.smth@domain.eis still rejected.Tests
test/interactions/email_check_test.rbcovers the new valid cases (smth@e.ee,smth@a.domain.ee,smth@sub.b.domain.ee,smth@1.ee) and invalid ones (smth@domain.e,smth@a.domain.e,smth@-.ee,smth@a-.ee).Ran locally: email_check, contact, EPP contact create, email verification force delete, verify emails job tests: 60 runs, 0 failures.