Zend Hostname validator is outdated for current TLD names. #9485
Labels
Bug
For errors / faults / flaws / inconsistencies etc.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone
Currently Piwik is using Hostname validator from 2011, which won't pass modern TLDs. Zend hostname validator requires TLD to have no more than 10 characters. Both versions 2.15 and 3.0 are affected.:
https://github.com/piwik/piwik/blob/3.0/libs/Zend/Validate/Hostname.php#L560
https://github.com/piwik/piwik/blob/2.15.0/libs/Zend/Validate/Hostname.php#L560
Currently IANA allow such TLDs as:
which have respectively 18 and 11 characters and are valid TLD names.
source: http://data.iana.org/TLD/tlds-alpha-by-domain.txt
Newest version of hostname validator isn't a solution either, because its hardcoded domain list doesn't contain all possible domain names.
https://github.com/zendframework/zend-validator/blob/master/src/Hostname.php#L76
The text was updated successfully, but these errors were encountered: