FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range
| Bug #71745 | FILTER_FLAG_NO_RES_RANGE does not cover whole 127.0.0.0/8 range | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2016-03-08 14:08 UTC | Modified: | 2016-07-08 14:34 UTC |
|
||||||
| From: | bugs dot php dot net at majkl578 dot cz | Assigned: | jpauli (profile) | |||||||
| Status: | Closed | Package: | Filter related | |||||||
| PHP Version: | 7.0.4 | OS: | ||||||||
| Private report: | No | CVE-ID: | None | |||||||
[2016-03-08 14:08 UTC] bugs dot php dot net at majkl578 dot cz
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"
Patches
Pull Requests
Pull requests:
History
AllCommentsChangesGit/SVN commits
[2016-07-08 14:34 UTC] jpauli@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: jpauli