ID: 39846
Updated by: [EMAIL PROTECTED]
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