Req #77221 [NEW]: Request IP address filter flag to exclude non-global IP addresses

From: Date: Thu, 29 Nov 2018 19:38:40 +0000
Subject: Req #77221 [NEW]: Request IP address filter flag to exclude non-global IP addresses
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218216@lists.php.net to get a copy of this message
From: dan dot franklin at fen dot com Operating system: Linux PHP version: Next Minor Version Package: Network related Bug Type: Feature/Change Request Bug description:Request IP address filter flag to exclude non-global IP addresses Description: ------------ Currently, filter_var is able to filter out private IP addresses and those reserved by protocol with the FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE flags respectively. There is a need for further filtering, to determine whether an IP address is Global, as described in RFC 6890. Only global addresses are useful in identifying the country of origin; this new filter would enable PHP code to search through the list of addresses in an X-Forwarded-For header to find the first global address and send only that address to a country locator such as GeoIP. Global addresses would also be useful for forensic purposes. This request is for a new flag, perhaps called FILTER_FLAG_ONLY_GLOBAL_RANGE, that would filter out all IP address ranges listed as “Global: false” in RFC 6890. -- Edit bug report at https://bugs.php.net/bug.php?id=77221&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77221&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77221&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77221&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77221&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77221&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77221&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77221&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77221&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77221&r=support Expected behavior: https://bugs.php.net/fix.php?id=77221&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77221&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77221&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77221&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77221&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77221&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77221&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77221&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77221&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77221&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77221&r=mysqlcfg

« previous php.bugs (#218216) next »