Issues

ZF-11927: Zend_Validate_Hostname problem with .EU IDN

Issue Type: Bug Created: 2011-12-05T19:04:44.000+0000 Last Updated: 2012-02-26T19:18:51.000+0000 Status: Open Fix version(s): Reporter: Martin Vaskovsky (martv) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

  • zf-crteam-review

Related issues: - ZF-9183

Attachments:

Description

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)?

Comments

Posted by Adam Lundrigan (adamlundrigan) on 2012-02-26T19:18:01.000+0000

Confirmed. Test fails:

<pre class="highlight">

Index: tests/Zend/Validate/HostnameTest.php
===================================================================
--- tests/Zend/Validate/HostnameTest.php (revision 24665)
+++ tests/Zend/Validate/HostnameTest.php (working copy)
@@ -455,4 +455,16 @@
         $this->assertFalse($validator->isValid('رات.si'));
     }

+
+    /**
+     * 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'));
+    }
 }

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts