#39846 [Opn->Asn]: Invalid IPv4 treated as valid

From: Date: Fri, 15 Dec 2006 23:53:44 +0000
Subject: #39846 [Opn->Asn]: Invalid IPv4 treated as valid
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106413@lists.php.net to get a copy of this message
ID: 39846 Updated by: iliaa@php.net Reported By: webvelosix at yahoo dot com -Status: Open +Status: Assigned Bug Type: Filter related Operating System: Windows XP PHP Version: 5.2.0 -Assigned To: +Assigned To: iliaa Previous Comments: ------------------------------------------------------------------------ [2006-12-15 19:39:14] webvelosix at yahoo dot com Description: ------------ Certain invalid IPV4 addresses passed in via _GET are treated as valid. Reproduce code: --------------- $input = filter_input(INPUT_GET, "ip", FILTER_VALIDATE_IP, array("flags" => FILTER_FLAG_IPV4)); print(($input === false) ? "Invalid!" : "Valid: ".$input); Expected result: ---------------- /test.php?ip=192.168.1.100 Valid: 192.168.1.100 /test.php?ip=192.168.1.100random-text-here Invalid! Actual result: -------------- /test.php?ip=192.168.1.100 Valid: 192.168.1.100 /test.php?ip=192.168.1.100random-text-here Valid: 192.168.1.100random-text-here ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39846&edit=1

« previous php.bugs (#106413) next »