Steps to reproduce the issue
Run the unit tests from PR #46723 on the 6.0-dev branch.
Expected result
All EmailRuleTest data sets pass. Invalid email addresses throw \UnexpectedValueException as documented.
Actual result
Two test cases fail:
user@ex!ample.com
user@exam_ple.com
Both throw Algo26\IdnaConvert\Exception\InvalidCharacterException instead of \UnexpectedValueException.
System information (as much as possible)
6.0-dev with algo26-matthias/idna-convert ^4.2.1. Does not affect 5.4 which uses ^3.2.1.
Additional comments:
PunycodeHelper::emailToPunycode() is called before the regex check in EmailRule::test() (lines 83 and 94). In v4 of the Algo26 library, ToIdn::convert() throws InvalidCharacterException for prohibited domain characters (!, _). This exception propagates uncaught, bypassing the expected UnexpectedValueException.
| Labels |
Added:
No Code Attached Yet
bug
|
||