#46343 [Opn->Csd]: IPv6 address filter accepts invalid address

From: Date: Mon, 20 Oct 2008 23:23:59 +0000
Subject: #46343 [Opn->Csd]: IPv6 address filter accepts invalid address
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129900@lists.php.net to get a copy of this message
 ID:               46343
 Updated by:       iliaa@php.net
 Reported By:      daan at react dot nl
-Status:           Open
+Status:           Closed
 Bug Type:         Filter related
 Operating System: Debian
 PHP Version:      5.2.6
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2008-10-20 11:55:01] daan at react dot nl

A little correction: 1:2:3:4:5:6:7: is in fact reported correctly as
being invalid. (so only :1:2:3:4:5:6:7 is faulty)

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

[2008-10-20 11:10:24] daan at react dot nl

Description:
------------
The IPv6 address filter in the filter extension accepts invalid IPv6
address notations: :1:2:3:4:5:6:7 and 1:2:3:4:5:6:7:.
Relevant RFC: http://tools.ietf.org/html/rfc4291#section-2.2

Reproduce code:
---------------
var_dump(filter_var(':1:2:3:4:5:6:7', FILTER_VALIDATE_IP,
FILTER_FLAG_IPV6));

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

Actual result:
--------------
':1:2:3:4:5:6:7'


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


-- 
Edit this bug report at http://bugs.php.net/?id=46343&edit=1



Thread (3 messages)

« previous php.bugs (#129900) next »