-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using IDN domain names, it is easy to reach the limit and throw exception Regex::DOMAIN_OR_SUBDOMAIN #1
Comments
Thank you very much for notifying. |
I'm on it. |
Perhaps okay, but why there's a limitation for hostname length? |
Hello This domain is valide xn--c1aafynu.xn--c1avg.xn--p1acf, but the regex doesn't match Why the lib, don't use https://www.php.net/manual/en/filter.filters.validate.php |
@xiaohuilam can you test #3 ? |
@james2001 I think this is better. filter_var($hostName, FILTER_VALIDATE_DOMAIN) because it will return false if $hostName = '_dnsauth.test.com';
var_dump(filter_var($hostName, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)); // it returns `false`, and unexpected.
and, please mention @bluelibraries for more review because he is the owner of this repository. |
dns/src/Handlers/AbstractDnsHandler.php
Lines 98 to 103 in 92208ec
The text was updated successfully, but these errors were encountered: