FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=15947&edit=1

ID: 15947
Updated by: daniel.oconnor@gmail.com
Reported By: pvillacorta at infoweapons dot com
Summary: Invalid IPv6 address accepted on function
Net_IPv6::checkIPv6
Status: Open
Type: Bug
Package: Net_IPv6
Operating System: FreeBSD
PHP Version: 5.2.8
Roadmap Versions:
New Comment:

Want to write a simple unit test to cover this?


Previous Comments:
------------------------------------------------------------------------

[2009-02-26 08:57:18] ppaul

Description:
------------
ipv6 address that was accepted
'2001:0ec8:0000:0000:0000:0000:0000:0001111'

Net_IPv6::checkIPv6('2001:0ec8:0000:0000:0000:0000:0000:0001111');
returned true which is not.

it should return false since it is an invalid ipv6 address

we should add extra validation for the ipv6 length before it will be
exploded (the ":")

if(strlen($ipPart[0]) > 40) {
return false;
}

Test script:
---------------


Expected result:
----------------


Actual result:
--------------

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 16, '09 at 11:38a
activeMay 16, '09 at 11:38a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase