ZF-11188: Ipv6 host

Issue Type: Bug Created: 2011-03-18T02:24:24.000+0000 Last Updated: 2011-05-03T15:47:27.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: Martin Panel (xorax) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Uri

  • Zend_Validate

Related issues: - ZF-11334

Attachments: - ZF-11188.patch


Actualy it's not possible to validate an url contains an ipv6 host with Zend_Uri, like

This affect many others componements, like Zend_Http_Client_Adapter, that could run fine if validation passed.


Posted by Dolf Schimmel (Freeaqingme) (freak) on 2011-03-18T02:38:58.000+0000

Code to reproduce:

<pre class="highlight"><?php
require_once 'Zend/Uri.php';

var_dump(Zend_Uri::check('<a href="http://[::1]/foo.html">http://[::1]/foo.html</a>', 'Uri'));

I would propose to use Zend_Validate_Hostname for the hostname part, I think running the zend_validate_hostname unittests on zend_uri_http would reveal more flaws.

Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T05:38:10.000+0000

Zend_Validate_Hostname does not detect IPv6 addresses with hex decimal f in them before r23900

Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T05:45:55.000+0000

Reproducing test case plus fix. Applying patch had no visible consequence w.r.t execution of test suite.

NOTE: Your ZF repo must be at r23900 or higher due to dependence on fix for ZF-11334

Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T05:48:03.000+0000

Fixed in trunk r23901

Posted by Ralph Schindler (ralph) on 2011-05-03T15:47:27.000+0000

Fixed in release branch 1.11 at r23970

Have you found an issue?

See the Overview section for more details.


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

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