|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-16 21:48 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 10:00:01 2025 UTC |
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