ZF-11927: Zend_Validate_Hostname problem with .EU IDN


Zend_Validator returns incorrect result when validating hostname "labužník.eu":

'labužník.eu' appears to be a DNS hostname but cannot match against hostname schema for TLD 'eu'

But this domain is successfully registered (www.whois.eu).

Same issue was reported earlier here http://framework.zend.com/issues/browse/ZF-9183 and here http://framework.zend.com/issues/browse/ZF-11489

All Latin characters (ž and í) are from the same script and can be mixed (and are used together, at least in Czech language). So I don't see the point of enforcing the rule about not-mixing charsets in one IDN, when EURid allows domain like this to be registered. What is the point of validator when it does not reflect reality (=doesn't work properly)?


Confirmed. Test fails:

Index: tests/Zend/Validate/HostnameTest.php
--- tests/Zend/Validate/HostnameTest.php (revision 24665)
+++ tests/Zend/Validate/HostnameTest.php (working copy)
@@ -455,4 +455,16 @@

+    /**
+     * Manual browser test yields:
+     * labužník.eu -> xn--labunk-7va27i.eu -> labuznik.com
+     *
+     * @group ZF-11927
+     */
+    public function testIdnForLabruznikcom()
+    {
+        $validator = new Zend_Validate_Hostname(Zend_Validate_Hostname::ALLOW_ALL);
+        $this->assertTrue($validator->isValid('labužník.eu'));
+    }