cvs: php-src(PHP_5_3) /ext/filter logical_filters.c
| From: | Ilia Alshanetsky | Date: | Mon, 23 Feb 2009 16:52:30 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/filter logical_filters.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-56363@lists.php.net to get a copy of this message | ||
iliaa Mon Feb 23 16:52:30 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/filter logical_filters.c
Log:
Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
addresses in the filter extension)
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/logical_filters.c?r1=1.1.2.22.2.6&r2=1.1.2.22.2.7&diff_format=u
Index: php-src/ext/filter/logical_filters.c
diff -u php-src/ext/filter/logical_filters.c:1.1.2.22.2.6
php-src/ext/filter/logical_filters.c:1.1.2.22.2.7
--- php-src/ext/filter/logical_filters.c:1.1.2.22.2.6 Mon Feb 2 23:50:31 2009
+++ php-src/ext/filter/logical_filters.c Mon Feb 23 16:52:29 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: logical_filters.c,v 1.1.2.22.2.6 2009/02/02 23:50:31 iliaa Exp $ */
+/* $Id: logical_filters.c,v 1.1.2.22.2.7 2009/02/23 16:52:29 iliaa Exp $ */
#include "php_filter.h"
#include "filter_private.h"
@@ -655,6 +655,12 @@
if (res < 1) {
RETURN_VALIDATION_FAILED
}
+ /* Check flags */
+ if (flags & FILTER_FLAG_NO_PRIV_RANGE) {
+ if (Z_STRLEN_P(value) >=2 && (!strncasecmp("FC", Z_STRVAL_P(value), 2) ||
!strncasecmp("FD", Z_STRVAL_P(value), 2))) {
+ RETURN_VALIDATION_FAILED
+ }
+ }
}
break;
}