php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
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
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
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 commitsRelated reports
 [2016-07-08 14:34 UTC] jpauli@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: jpauli
 [2016-07-08 14:34 UTC] jpauli@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:29 2024 UTC