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

[BUG] Domain names are case insensitive #9

Closed
AlexeyDemidov opened this issue Mar 25, 2019 · 3 comments
Closed

[BUG] Domain names are case insensitive #9

AlexeyDemidov opened this issue Mar 25, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@AlexeyDemidov
Copy link

Domain names are case insensitive, e.g. example.com, EXAMPLE.COM and examPLE.Com should all be treated as the same domain, but this code currently allows only lowercase domain names and rejects uppercase or mixed-case as invalid.

@bestwebua bestwebua added the invalid This doesn't seem right label Mar 26, 2019
@bestwebua
Copy link
Member

Hello Alexey! Indeed it is true, but properly configured server never should return 'DoMain.cOm' as HELO request argument.

@AlexeyDemidov
Copy link
Author

This is not true - there is nothing in the current standards preventing usage of uppercase or mixed-case domains (See RFC 4343). There is common usage of all uppercase emails like JOHN.DOE@GMAIL.COM (especially in Windows environment as they historically defaulted to uppercase domain names) or mixed case emails like John.Doe@GMail.com. Those emails are valid and are accepted and delivered by standard complaint mail software without problem. But Truemail.validate('John.Doe@GMail.com') and Truemail.validate('JOHN.DOE@GMAIL.COM') both return error email does not match the regular expression.

@bestwebua bestwebua added enhancement New feature or request and removed invalid This doesn't seem right labels Mar 27, 2019
@bestwebua
Copy link
Member

bestwebua commented Mar 27, 2019

Thank you, Alexey 👍 Fixed!

@bestwebua bestwebua self-assigned this Mar 27, 2019
@bestwebua bestwebua added bug Something isn't working and removed enhancement New feature or request labels Mar 27, 2019
bestwebua added a commit that referenced this issue Mar 27, 2019
bestwebua added a commit that referenced this issue Mar 27, 2019
* Fix regex issues: #7, #8, #9
* Update tests
@bestwebua bestwebua changed the title Domain names are case insensitive [BUG] Domain names are case insensitive Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants