We have just upgraded to hibernate-validator 5.x (from 4.x). One of our IT fails with the following email: sjmw0bnvfqqmorqii0zba0ksyvp8sdda8i6t8erjep4t3fymzmx4iv01dhe3adv@2oanppnisfqyd1prvfzrki7qopefaotb1898bmokq1xmcvms7jrdzynliqphi0m.com In this case the call to toAscii is broken down in two cycles:
- 2oanppnisfqyd1prvfzrki7qopefaotb1898bmokq1xmcvms7jrdzynliqphi0m
- .com
The last cycle will throw an IllegalArgumentException( "Empty label is not a legal name") in IDN.toASCIIInternal Failing test case:
@Test
public void testEmailWith63CharacterDomainPartIsValid() {
isValidEmail( "foo@" + stringOfLength( 63 ) + ".com" );
}
I guess this was broken in
HV-1005 - @Email incorrectly flags emails with 64 character length local-part as invalid Complete where some of the code was rewritten by @hardy.ferentschik |