diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-11-21 09:50:14 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-11-21 09:50:14 +0100 |
commit | 0d7d3241164b4769b93867da2e8adb724ae17950 (patch) | |
tree | 18848ffcc5f7d70c56cd890352f518b60af11ea1 /ext/filter | |
parent | 3f2474550cbf299d8a7df34988ece052a0401414 (diff) | |
download | php-0d7d3241164b4769b93867da2e8adb724ae17950.tar.gz |
New upstream version 5.5.6+dfsgupstream/5.5.6+dfsg
Diffstat (limited to 'ext/filter')
-rw-r--r-- | ext/filter/logical_filters.c | 2 | ||||
-rw-r--r-- | ext/filter/tests/018.phpt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 653cce23e..39433d6ec 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -714,7 +714,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ if (flags & FILTER_FLAG_NO_RES_RANGE) { if ( (ip[0] == 0) || - (ip[0] == 100 && (ip[1] >= 64 || ip[1] <= 127)) || + (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) || diff --git a/ext/filter/tests/018.phpt b/ext/filter/tests/018.phpt index 9c73fc3cf..75bbd1342 100644 --- a/ext/filter/tests/018.phpt +++ b/ext/filter/tests/018.phpt @@ -15,7 +15,7 @@ var_dump(filter_var("192.168.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)); var_dump(filter_var("127.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var("192.0.0.1", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); -var_dump(filter_var("100.0.0.0", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); +var_dump(filter_var("100.64.0.0", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var("100.127.255.255", FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)); var_dump(filter_var("192.0.34.166", FILTER_VALIDATE_IP)); var_dump(filter_var("256.1237.123.1", FILTER_VALIDATE_IP)); |