Browse Source

Remove 128.0.0.0/16 and 191.255.0.0/16 from the reserved list.

These were returned to the general allocation pool by RFC 3330, and hence
shouldn't cause an IP address validation failure due to being reserved. At
least 128.0.0.0/16 is in use on the public Internet today.

Fixes bug #66229 (128.0.0.0/16 isn't reserved any longer).
pull/539/head
Adam Harvey 13 years ago
parent
commit
d1314893fd
  1. 3
      NEWS
  2. 2
      ext/filter/logical_filters.c
  3. 4
      ext/filter/tests/bug53150.phpt

3
NEWS

@ -15,6 +15,9 @@ PHP NEWS
. Fixed bug #65196 (Passing DOMDocumentFragment to DOMDocument::saveHTML()
Produces invalid Markup). (Mike)
- Filter:
. Fixed bug #66229 (128.0.0.0/16 isn't reserved any longer). (Adam)
- XSL
. Fixed bug #49634 (Segfault throwing an exception in a XSL registered
function). (Mike)

2
ext/filter/logical_filters.c

@ -715,8 +715,6 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
if (
(ip[0] == 0) ||
(ip[0] == 100 && (ip[1] >= 64 && ip[1] <= 127)) ||
(ip[0] == 128 && ip[1] == 0) ||
(ip[0] == 191 && ip[1] == 255) ||
(ip[0] == 169 && ip[1] == 254) ||
(ip[0] == 192 && ip[1] == 0 && ip[2] == 2) ||
(ip[0] == 127 && ip[1] == 0 && ip[2] == 0 && ip[3] == 1) ||

4
ext/filter/tests/bug53150.phpt

@ -23,6 +23,6 @@ string(3) "::1"
bool(false)
bool(false)
string(9) "128.0.0.1"
bool(false)
string(9) "128.0.0.1"
string(11) "191.255.0.0"
string(11) "191.255.0.0"
bool(false)
Loading…
Cancel
Save