Issues

ZF-11188: Ipv6 host

Description

Actualy it's not possible to validate an url contains an ipv6 host with Zend_Uri, like http://www.ietf.org/rfc/rfc2732.txt

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

Comments

Code to reproduce:

<?php
require_once 'Zend/Uri.php';

var_dump(Zend_Uri::check('http://[::1]/foo.html', '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.

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

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

Fixed in trunk r23901

Fixed in release branch 1.11 at r23970