Bug #71745 [NEW]: FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range

From: Date: Tue, 08 Mar 2016 14:08:40 +0000
Subject: Bug #71745 [NEW]: FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199671@lists.php.net to get a copy of this message
From: bugs dot php dot net at majkl578 dot cz Operating system: PHP version: 7.0.4 Package: Filter related Bug Type: Bug Bug description:FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range Description: ------------ Although whole 127.0.0.0/8 range is reserved, PHP only (and incorrectly) validates 127.0.0.1/32. I.e. 127.0.0.2 or 127.0.1.1 should be also treated as reserved range, but they are not currently. Test script: --------------- var_dump(filter_var('127.0.1.1', FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE)); Expected result: ---------------- bool(false) Actual result: -------------- string(9) "127.0.1.1" -- Edit bug report at https://bugs.php.net/bug.php?id=71745&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71745&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71745&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71745&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71745&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71745&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71745&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71745&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71745&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71745&r=support Expected behavior: https://bugs.php.net/fix.php?id=71745&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71745&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71745&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71745&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71745&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71745&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71745&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71745&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71745&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71745&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71745&r=mysqlcfg

« previous php.bugs (#199671) next »