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

extended ascii passed isEmail validation #2390

Open
born2net opened this issue Apr 23, 2024 · 2 comments · May be fixed by #2473
Open

extended ascii passed isEmail validation #2390

born2net opened this issue Apr 23, 2024 · 2 comments · May be fixed by #2473

Comments

@born2net
Copy link

born2net commented Apr 23, 2024

when using email like aˇol@a.com it passes validation of isEmail
you cannot use extended characters in emails.
even if I enable: allow_utf8_local_part: false
these emails will also pass as valid:

ka25maj@gˇmail.com

has this never been reported?

@iamkhusainov7
Copy link

iamkhusainov7 commented May 15, 2024

Hello. I have the same issue here. It seems the validator does not validate on DNS and is not checking if an email is RFC compliant.

@aabboudi
Copy link

aabboudi commented Oct 5, 2024

Internationalized domain names (IDNs) may accept extended ASCII characters. Setting allow_utf8_local_part to false fixes the first issue, causing aˇol@a.com to fail validation as expected. However, ka25maj@gˇmail.com would still pass as the option only affects the local part of the email.

To address this, I suggest introducing a separate allow_idn option to allow developers to specify whether IDNs are valid for their use case. By default, this should be set to false since IDNs are less common. An alternative solution is adding allow_utf8_domain, but the first solution seems more intuitive.

If the fix is deemed fit, please assign the issue to me.

@aabboudi aabboudi linked a pull request Oct 12, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants