From 02f527a6948558636ea04198a61e4a8d231f0484 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Thu, 17 Jul 2014 13:59:29 +0200 Subject: some php_varname_check()s may be silent as we produce custom errors --- ex_imp.c | 2 +- ifilter.c | 2 +- ufilter.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ex_imp.c b/ex_imp.c index 15bad3d..2ea2b99 100644 --- a/ex_imp.c +++ b/ex_imp.c @@ -74,7 +74,7 @@ static int php_valid_var_name(char *var_name, int len) /* {{{ */ } } - if (php_varname_check(var_name, len, 0 TSRMLS_CC) == FAILURE) { + if (php_varname_check(var_name, len, 1 TSRMLS_CC) == FAILURE) { return 0; } diff --git a/ifilter.c b/ifilter.c index 65b48cd..d85c3c2 100644 --- a/ifilter.c +++ b/ifilter.c @@ -620,7 +620,7 @@ unsigned int suhosin_input_filter(int arg, char *var, char **val, unsigned int v /* Drop this variable if it is one of GLOBALS, _GET, _POST, ... */ /* This is to protect several silly scripts that do globalizing themself */ - if (php_varname_check(var, var_len, 0 TSRMLS_CC) == FAILURE) { + if (php_varname_check(var, var_len, 1 TSRMLS_CC) == FAILURE) { suhosin_log(S_VARS, "tried to register forbidden variable '%s' through %s variables", var, arg == PARSE_GET ? "GET" : arg == PARSE_POST ? "POST" : "COOKIE"); if (!SUHOSIN_G(simulation)) { return 0; diff --git a/ufilter.c b/ufilter.c index 6775ec1..6464ce6 100644 --- a/ufilter.c +++ b/ufilter.c @@ -133,7 +133,7 @@ static int check_fileupload_varname(char *varname) /* Drop this variable if it is one of GLOBALS, _GET, _POST, ... */ /* This is to protect several silly scripts that do globalizing themself */ - if (php_varname_check(var, var_len, 0 TSRMLS_CC) == FAILURE) { + if (php_varname_check(var, var_len, 1 TSRMLS_CC) == FAILURE) { suhosin_log(S_FILES, "tried to register forbidden variable '%s' through FILE variables", var); if (!SUHOSIN_G(simulation)) { goto return_failure; -- cgit v1.3