From c98e28795fc75abfcc1644217e2d5ef3b8b55e3e Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Mon, 20 Oct 2008 17:09:10 +0000 Subject: Fixed #46313 (Magic quotes broke $_FILES) # magic_quotes_gpc was disabled during registration of $_FILES["x"]["tmp_name"] # and $GLOBALS["x"] (which is tmp_name with register_globals enabled). This # caused "x" to not be escaped so there was 2 different keys for the same file # in $_FILES, one with tmp_name and the other without. # All other variables (name, size, etc) are registered with magic_quotes_gpc # untouched, both in $_FILES and $GLOBALS and I did not found a reason for # disabling it for tmp_name. --- main/rfc1867.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'main') diff --git a/main/rfc1867.c b/main/rfc1867.c index a32abfc298..8d51a3f612 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -1283,8 +1283,6 @@ filedone: /* Initialize variables */ add_protected_variable(param TSRMLS_CC); - magic_quotes_gpc = PG(magic_quotes_gpc); - PG(magic_quotes_gpc) = 0; /* if param is of form xxx[.*] this will cut it to xxx */ if (!is_anonymous) { safe_php_register_variable(param, temp_filename, strlen(temp_filename), NULL, 1 TSRMLS_CC); @@ -1299,8 +1297,6 @@ filedone: add_protected_variable(lbuf TSRMLS_CC); register_http_post_files_variable(lbuf, temp_filename, http_post_files, 1 TSRMLS_CC); - PG(magic_quotes_gpc) = magic_quotes_gpc; - { zval file_size, error_type; -- cgit v1.2.1