From 6814cbec4bdf13caede74085cd9fe3c44c8dba0e Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 24 May 2011 22:34:07 +0000 Subject: [PATCH] - Fix logic, it must check for both flags (as says the comment in the code) (bug #54912) --- ext/filter/logical_filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 8dc98fdd1a..d080d9ad2b 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -682,7 +682,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ RETURN_VALIDATION_FAILED } - if (flags & (FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { + if ((flags & FILTER_FLAG_IPV4) && (flags & FILTER_FLAG_IPV6)) { /* Both formats are cool */ } else if ((flags & FILTER_FLAG_IPV4) && mode == FORMAT_IPV6) { RETURN_VALIDATION_FAILED -- 2.40.0