ZF-8640: Zend_Validate_Ip - IPv6 regex may allow newlines

Issue Type: Bug Created: 2009-12-27T06:02:42.000+0000 Last Updated: 2009-12-27T07:16:49.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Pádraic Brady (padraic) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


In some circumstances, the IPv6 regexes may allow a newline after the IP:

<pre class="highlight">require_once 'Zend/Validate/Ip.php';
$v = new Zend_Validate_Ip;
var_dump($v->isValid("::C0A8:2\n")); // TRUE


Posted by Pádraic Brady (padraic) on 2009-12-27T06:06:11.000+0000

This won't work on any IPv6 IP which can parsed back to IPv4.

Posted by Thomas Weidner (thomas) on 2009-12-27T07:16:49.000+0000

Fixed with r19949

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.