Bug #21046 [Com]: checkIPv6 wrongly validates IPv6 IPs with leading and/or trailing :
| From: | phildavis | Date: | Fri, 25 Mar 2016 05:11:34 +0000 |
| Subject: | Bug #21046 [Com]: checkIPv6 wrongly validates IPv6 IPs with leading and/or trailing : | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-11316@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=21046&edit=1
ID: 21046
Comment by: phildavis
Reported By: phil dot davis at inf dot org
Summary: checkIPv6 wrongly validates IPv6 IPs with leading
and/or trailing :
Status: Open
Type: Bug
Package: Net_IPv6
Operating System: FreeBSD
Package Version: 1.2.1
PHP Version: 5.6.19
New Comment:
Proposed fix at https://github.com/pear/Net_IPv6/pull/14
Previous Comments:
------------------------------------------------------------------------
[2016-03-24 19:39:52] cbuechler
Description:
------------
Net_IPv6::checkIPv6 wrongly validates full length IPv6 IPs that have a
leading and/or trailing colon.
Test script:
---------------
these three examples should return false, but return true:
var_dump(Net_IPv6::checkIPv6("1234:5678:90AB:CDEF:1234:5678:90AB:CDEF:"));
var_dump(Net_IPv6::checkIPv6(":1234:5678:90AB:CDEF:1234:5678:90AB:CDEF"));
var_dump(Net_IPv6::checkIPv6(":1234:5678:90AB:CDEF:1234:5678:90AB:CDEF:"));
Expected result:
----------------
The three examples provided aren't valid IPv6 IPs and should return
false,
not true.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=21046&edit=1