You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems any IDN can't get past the regexp in regDomain.class.php:
if (!preg_match("/^([a-z0-9])(([a-z0-9-])*([a-z0-9]))*$/", $domPart)) return FALSE;
If anybody's interested, the library could be augmented to support UTF8 letter characters by adding the \p{L} character set along with a-z0-9 and adding /u at the end:
if (!preg_match("/^([a-z0-9\p{L}])(([a-z0-9-\p{L}])*([a-z0-9\p{L}]))*$/u", $domPart)) return FALSE;
I tested it as such and it worked:
echo (new regDomain())->getRegisteredDomain("example.мон", false);
And it works for that IDN (.xn--l1acc):
example.мон
I could submit a pull request if nobody sees an issue
The text was updated successfully, but these errors were encountered:
@wadih, thanks for your feedback and research: in 9fccafa I simply disabled the domain label length validation and the regexp to prevent false analysis.
I tend to change the processing so there is a second suffix tree being encoded to ACE and all checks including length validation and character validation are done in ASCII. Downward compatibility should be kept.
It seems any IDN can't get past the regexp in
regDomain.class.php
:If anybody's interested, the library could be augmented to support UTF8 letter characters by adding the
\p{L}
character set along witha-z0-9
and adding/u
at the end:I tested it as such and it worked:
And it works for that IDN (.xn--l1acc):
I could submit a pull request if nobody sees an issue
The text was updated successfully, but these errors were encountered: