cvs: php-src(PHP_5_2) /ext/standard basic_functions.c

From: Date: Sat, 10 Mar 2007 19:20:16 +0000
Subject: cvs: php-src(PHP_5_2) /ext/standard basic_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43492@lists.php.net to get a copy of this message
iliaa Sat Mar 10 19:20:16 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard basic_functions.c Log: Added additional checks for long input arrays inside import_request_variables(). # Missing checks identified by Stefan Esser http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.46&r2=1.725.2.31.2.47&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.46 php-src/ext/standard/basic_functions.c:1.725.2.31.2.47 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.46 Fri Mar 9 01:48:56 2007 +++ php-src/ext/standard/basic_functions.c Sat Mar 10 19:20:16 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.46 2007/03/09 01:48:56 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.47 2007/03/10 19:20:16 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -6259,6 +6259,19 @@ ) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted super-global (%s) variable overwrite.", hash_key->arKey); return 0; + } else if (*hash_key->arKey == 'H' && + ( + !strcmp(hash_key->arKey, "HTTP_POST_VARS") || + !strcmp(hash_key->arKey, "HTTP_GET_VARS") || + !strcmp(hash_key->arKey, "HTTP_COOKIE_VARS") || + !strcmp(hash_key->arKey, "HTTP_ENV_VARS") || + !strcmp(hash_key->arKey, "HTTP_SERVER_VARS") || + !strcmp(hash_key->arKey, "HTTP_RAW_POST_DATA") || + !strcmp(hash_key->arKey, "HTTP_POST_FILES") + ) + ) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempted long input array (%s) overwrite.", hash_key->arKey); + return 0; } }

« previous php.cvs (#43492) next »