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:

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

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure