We're updating the issue view to help you get more done. 

email domains with a 63 character length fails EmailValidator

Description

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:

1 2 3 4 5 @Test public void testEmailWith63CharacterDomainPartIsValid() { // Domain part should allow up to 255 isValidEmail( "foo@" + stringOfLength( 63 ) + ".com" ); }

I guess this was broken in where some of the code was rewritten by @hardy.ferentschik

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Marc Vanbrabant

Labels

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.2.4.Final

Priority

Major