From 34b6eb346dfcefd56b7f02fab85ac26d3841f081 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 17 Nov 2005 13:53:06 +0000 Subject: [PATCH] - wrong check for empty - forgot to check $sanitize --- libraries/grab_globals.lib.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libraries/grab_globals.lib.php b/libraries/grab_globals.lib.php index 90c31be68..ee148cdfc 100644 --- a/libraries/grab_globals.lib.php +++ b/libraries/grab_globals.lib.php @@ -74,15 +74,19 @@ function PMA_gpc_extract($array, &$target, $sanitize = TRUE) { return FALSE; } - $valid_variables = preg_replace( $GLOBALS['import_blacklist'], '', - array_keys( $array ) ); - $valid_variables = array_unique( $valid_variables ); + if ( $sanitize ) { + $valid_variables = preg_replace( $GLOBALS['import_blacklist'], '', + array_keys( $array ) ); + $valid_variables = array_unique( $valid_variables ); + } else { + $valid_variables = array_keys( $array ); + } $is_magic_quotes = get_magic_quotes_gpc(); foreach ( $valid_variables as $key ) { - if ( empty( $key ) ) { + if ( strlen( $key ) === 0 ) { continue; } @@ -101,6 +105,7 @@ function PMA_gpc_extract($array, &$target, $sanitize = TRUE) { return TRUE; } + // check if a subform is submitted $__redirect = NULL; if ( isset( $_POST['usesubform'] ) ) {