#27029: Make EmailValidator accept non-ASCII characters
-------------------------------------+-------------------------------------
Reporter: Ramin Farajpour | Owner: j-bernard
Cami |
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Collin Anderson):
* cc: Collin Anderson (added)
Old description:
> {{{
> from django.core.validators import validate_email
> validate_email('うえあいお@email.com')
> }}}
>
> if you check this url email chacker with うえあいお@address.com , this is
> not valid email address ,
>
> Thanks,
> Ramin
New description:
{{{
from django.core.validators import validate_email
validate_email('うえあいお@email.com')
}}}
if you check this url email chacker with うえあいお@address.com , this is
not valid email address ,
Thanks,
Ramin
--
Comment:
I'm just noticing today that unicode.org has recommendations on email
security:
https://www.unicode.org/reports/tr39/#Email_Security_Profiles
- It must be in NFKC format
- It must have level = <restriction level> or less, from
`Restriction_Level_Detection`
- It must not have mixed number systems according to
`Mixed_Number_Detection`
- It must satisfy dot-atom-text from RFC 5322 §3.2.3, where atext is
extended as follows:
- Where C ≤ U+007F, C is defined as in §3.2.3. (That is, C ∈
[!#-'*+\-/-9=?A-Z\^-~]. This list copies what is already in §3.2.3, and
follows HTML5 for ASCII.)
- Where C > U+007F, both of the following conditions are true:
- C has `Identifier_Status=Allowed` from General Security Profile
- If C is the first character, it must be `XID_Start` from Default
Identifier_Syntax in [UAX31]
It doesn't recommend which "restriction level" to use, and maybe we should
allow the user to decide what level to use (defaulting to 1: ASCII-Only).
(Also, it would be nice if Python implemented "Mixed-Script Detection",
"Restriction-Level Detection" and "Mixed-Number Detection" as part of
unicodedata.)
--
Ticket URL: <https://code.djangoproject.com/ticket/27029#comment:36>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018da47f8c0b-ac22e7ad-70f4-4c86-9f42-5d43d63f5f4f-000000%40eu-central-1.amazonses.com.