ZF-6133: Zend_Validate_Hostname fails if Punycode is used for IDN
If ACE is used for an IDN like müller.de (which is xn--mller-kva.de) Zend_Validate_Hostname fails, because the ACE prefix has a dash in the third and fourth position. At least the IDNA prefix xn-- should be supported, as there are a couple of use-cases, that allow using ACE in RFC 3490.
As exposing the user to raw ACE should be avoided if possible the support for xn-- can be added as an option, which defaults to false.
Reproduce with: <?php require_once 'Zend/Validate/Hostname.php'; $validate = new Zend_Validate_Hostname(); var_dump($validate->isValid('müller.de')); var_dump($validate->isValid('xn--mller-kva.de')); ?>
Result: bool(true) bool(false)
Expected: bool(true) bool(true)