cvs: /php4 main.c php_globals.h rfc1867.c
| From: | Zeev Suraski | Date: | Sat, 26 Feb 2000 18:59:59 +0000 |
| Subject: | cvs: /php4 main.c php_globals.h rfc1867.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-11053@lists.php.net to get a copy of this message | ||
zeev Sat Feb 26 10:59:59 2000 EDT
Modified files:
/php4 main.c php_globals.h rfc1867.c
Log:
- Protect $HTTP_POST_FILES[] as well
Index: php4/main.c
diff -u php4/main.c:1.220 php4/main.c:1.221
--- php4/main.c:1.220 Sat Feb 26 08:36:57 2000
+++ php4/main.c Sat Feb 26 10:59:29 2000
@@ -19,7 +19,7 @@
*/
-/* $Id: main.c,v 1.220 2000/02/26 16:36:57 zeev Exp $ */
+/* $Id: main.c,v 1.221 2000/02/26 18:59:29 zeev Exp $ */
#include <stdio.h>
@@ -956,7 +956,7 @@
php_import_environment_variables(ELS_C PLS_CC);
}
- PG(http_globals).post = PG(http_globals).get = PG(http_globals).cookie = PG(http_globals).server =
PG(http_globals).environment = NULL;
+ PG(http_globals).post = PG(http_globals).get = PG(http_globals).cookie = PG(http_globals).server =
PG(http_globals).environment = PG(http_globals).post_files = NULL;
while(*p) {
switch(*p++) {
@@ -1013,7 +1013,9 @@
if (PG(http_globals).environment) {
zend_hash_add_ptr(&EG(symbol_table), "HTTP_ENV_VARS",
sizeof("HTTP_ENV_VARS"), PG(http_globals).environment, sizeof(zval *), NULL);
}
-
+ if (PG(http_globals).post_files) {
+ zend_hash_add_ptr(&EG(symbol_table), "HTTP_POST_FILES",
sizeof("HTTP_POST_FILES"), PG(http_globals).post_files, sizeof(zval *),NULL);
+ }
if (!have_variables_order) {
php_register_server_variables(ELS_C SLS_CC PLS_CC);
Index: php4/php_globals.h
diff -u php4/php_globals.h:1.44 php4/php_globals.h:1.45
--- php4/php_globals.h:1.44 Sat Feb 26 08:36:57 2000
+++ php4/php_globals.h Sat Feb 26 10:59:29 2000
@@ -48,6 +48,7 @@
zval *cookie;
zval *server;
zval *environment;
+ zval *post_files;
} php_http_globals;
struct _php_tick_function_entry;
Index: php4/rfc1867.c
diff -u php4/rfc1867.c:1.29 php4/rfc1867.c:1.30
--- php4/rfc1867.c:1.29 Sat Feb 19 15:21:25 2000
+++ php4/rfc1867.c Sat Feb 26 10:59:29 2000
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.29 2000/02/19 23:21:25 zeev Exp $ */
+/* $Id: rfc1867.c,v 1.30 2000/02/26 18:59:29 zeev Exp $ */
#include <stdio.h>
#include "php.h"
@@ -71,7 +71,7 @@
ALLOC_ZVAL(http_post_files);
array_init(http_post_files);
INIT_PZVAL(http_post_files);
- zend_hash_add_ptr(&EG(symbol_table), "HTTP_POST_FILES",
sizeof("HTTP_POST_FILES"), http_post_files, sizeof(zval *),NULL);
+ PG(http_globals).post_files = http_post_files;
}