Repository navigation
Commit e1263df
committed
Match the email local part without Unicode case folding
The local-part pattern lists the characters it allows explicitly: ASCII
letters and digits, the RFC 5322 specials and U+00A0 to U+024F. Compiled
with re.IGNORECASE but not re.ASCII, a character also matches when its
case-folded form is in a class, which admitted 31 characters outside
those ranges: the Kelvin sign (U+212A) through "k", the Angstrom sign
(U+212B), Greek mu, U+1E9E and IPA letters. The Kelvin and Angstrom
signs render as "K" and "A with ring above", so "Kelvin@example.com"
could be registered next to a lookalike.
With re.ASCII, case-insensitive matching applies to ASCII letters only.
Both cases of the allowed Latin letters are already in the ranges, so
nothing inside them is lost.1 parent 22786cc commit e1263df
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments