#48310 [Fbk->Opn]: filter accepts invalid IPv6 address

From: Date: Sun, 17 May 2009 17:18:32 +0000
Subject: #48310 [Fbk->Opn]: filter accepts invalid IPv6 address
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-137419@lists.php.net to get a copy of this message
ID: 48310 User updated by: geoffers+phpbugs at gmail dot com Reported By: geoffers+phpbugs at gmail dot com -Status: Feedback +Status: Open Bug Type: Filter related Operating System: Mac OS 10.5.6 PHP Version: 5.2.9 New Comment: Both 5.2 and 5.3 CVS give the same output as 5.2.9 Previous Comments: ------------------------------------------------------------------------ [2009-05-17 16:54:29] pajoye@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-05-17 16:49:39] geoffers+phpbugs at gmail dot com Description: ------------ The string '0:0:0:255.255.255.255' is not a valid IPv6 address. The filter extension allows it. Reproduce code: --------------- var_dump(filter_var('0:0:0:255.255.255.255', FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); Expected result: ---------------- bool(false) Actual result: -------------- string(21) "0:0:0:255.255.255.255" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48310&edit=1

« previous php.bugs (#137419) next »