Author: Guillaume Smet <guillaume.smet(a)gmail.com>
Date: 2016-08-30 (Tue, 30 Aug 2016)
HV-1066 Don't use IDN.toASCII on the local part of the email
Using IDN.toASCII on the local part of the email was a bad idea to begin
with, forcing us to introduce a splitting logic on top of IDN.toASCII.
Executing IDN.toASCII on each chunk of a split string is not equivalent
to executing it on the whole string, potentially opening the way for
Thus, we ended up doing the following:
- allow the \u0080-\uFFFF character range in the local part of the email
thus allowing local parts containing UTF-8 characters;
- only use IDN.toASCII on the domain name as it should be.
This simplifies the logic a lot and should limit the number of bugs in
- improve the feedback in email validation tests;
- be more cautious about how we generate the domain names in tests: each
label of a domain name must be at most 63 characters long.