ZF-11334: Zend_Validate_Hostname does not identify IPv6 addresses properly
Description
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: http://www.ietf.org/rfc/rfc2732.txt for IPv6 address examples used in tests
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T05:30:08.000+0000
Reproducing test case plus fix. Applying patch had no visible consequence w.r.t execution of test suite.
Posted by Adam Lundrigan (adamlundrigan) on 2011-04-30T05:31:34.000+0000
Fixed in trunk r23900
Posted by Thomas Weidner (thomas) on 2011-05-01T07:05:18.000+0000
Reassigning to component author
Posted by Ralph Schindler (ralph) on 2011-05-03T15:23:06.000+0000
Thomas, why did you reassign? Is this commit bad? It seems complete- do you need to do any more to this?
Posted by Ralph Schindler (ralph) on 2011-05-03T16:19:53.000+0000
Re-assigning to Adam for bug-hunt credit, verified fix and will merge.
Posted by Ralph Schindler (ralph) on 2011-05-03T16:26:57.000+0000
Fixed in release branch 1.11 at r23972
Posted by Thomas Weidner (thomas) on 2011-07-13T08:13:10.000+0000
@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
Posted by Thomas Weidner (thomas) on 2011-08-25T19:49:14.000+0000
Added to ZF2 with GH-276 I hope this was correct as there was no response to my previous question