ZF-11334: Zend_Validate_Hostname does not identify IPv6 addresses properly


Zend_Validate_Hostname Line 505-506 checks to see if the argument to isValid is an IP address, and if so checks to see if it is a valid IP:

if (preg_match('/^[0-9.a-e:.]*$/i', $value) &&
            $this->_options['ip']->setTranslator($this->getTranslator())->isValid($value)) {

Notice that the preg express accepts only hex characters A through E, omitting F.

See: for IPv6 address examples used in tests


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

Fixed in trunk r23900

Reassigning to component author

Thomas, why did you reassign? Is this commit bad? It seems complete- do you need to do any more to this?

Re-assigning to Adam for bug-hunt credit, verified fix and will merge.

Fixed in release branch 1.11 at r23972

@Ralph: As I did not get reply on my mails I am asking you this way if I am allowed to add this to ZF2 or if you still want me not to touch components where I am the maintainer. A duplication was also not wanted, so please state how things should be done correct, or state if ZF1 issues should not be solved for ZF2

Added to ZF2 with GH-276 I hope this was correct as there was no response to my previous question