php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66229 128.0.0.0/16 isn't reserved any longer.
Submitted: 2013-12-03 22:20 UTC Modified: 2013-12-03 22:55 UTC
From: georgestephanis at automattic dot com Assigned: aharvey (profile)
Status: Closed Package: Filter related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: georgestephanis at automattic dot com
New email:
PHP Version: OS:

 

 [2013-12-03 22:20 UTC] georgestephanis at automattic dot com
Description:
------------
As per RFC3330: http://tools.ietf.org/html/rfc3330

   128.0.0.0/16 - This block, corresponding to the numerically lowest of
   the former Class B addresses, was initially and is still reserved by
   the IANA.  Given the present classless nature of the IP address
   space, the basis for the reservation no longer applies and addresses
   in this block are subject to future allocation to a Regional Internet
   Registry for assignment in the normal manner.

however,

https://github.com/php/php-src/blob/master/ext/filter/logical_filters.c#L718

still tests for 128.0.x.x

Test script:
---------------
$valid = filter_var( '128.0.46.45', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE );


Expected result:
----------------
$valid === '128.0.46.45';

Actual result:
--------------
$valid === false;

Patches

dont-reserve-128-0-x-x (last revision 2013-12-03 22:20 UTC by georgestephanis at automattic dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-03 22:21 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2013-12-03 22:55 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2013-12-03 22:55 UTC] aharvey@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.

Fixed in 5.4, 5.5, 5.6 and master.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC