From 87c4a01b87608b7abc12c8258aad8b052b8c5a67 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 7 Mar 2006 14:43:16 +0000 Subject: Nuke safe_mode from sapi/* # only main/ remains at this point, this is the next step --- sapi/apache_hooks/php_apache.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sapi/apache_hooks/php_apache.c') diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index aaeaa76d6c..0e9fc4d5f7 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -44,7 +44,7 @@ extern module **ap_loaded_modules; static int le_apachereq; static zend_class_entry *apacherequest_class_entry; -static void apache_table_to_zval(table *, int safe_mode, zval *return_value); +static void apache_table_to_zval(table *, zval *return_value); PHP_FUNCTION(virtual); PHP_FUNCTION(apache_request_headers); @@ -1682,7 +1682,7 @@ PHP_MINFO_FUNCTION(apache) env_arr = table_elts(r->headers_in); env = (table_entry *)env_arr->elts; for (i = 0; i < env_arr->nelts; ++i) { - if (env[i].key && (!PG(safe_mode) || (PG(safe_mode) && strncasecmp(env[i].key, "authorization", 13)))) { + if (env[i].key) { php_info_print_table_row(2, env[i].key, env[i].val); } } @@ -1746,9 +1746,9 @@ PHP_FUNCTION(virtual) /* }}} */ -/* {{{ apache_table_to_zval(table *, int safe_mode, zval *return_value) +/* {{{ apache_table_to_zval(table *, zval *return_value) Fetch all HTTP request headers */ -static void apache_table_to_zval(table *t, int safe_mode, zval *return_value) +static void apache_table_to_zval(table *t, zval *return_value) { array_header *env_arr; table_entry *tenv; @@ -1758,8 +1758,7 @@ static void apache_table_to_zval(table *t, int safe_mode, zval *return_value) env_arr = table_elts(t); tenv = (table_entry *)env_arr->elts; for (i = 0; i < env_arr->nelts; ++i) { - if (!tenv[i].key || - (safe_mode && !strncasecmp(tenv[i].key, "authorization", 13))) { + if (tenv[i].key) { continue; } if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) { @@ -1780,7 +1779,7 @@ static void apache_table_to_zval(table *t, int safe_mode, zval *return_value) Fetch all HTTP request headers */ PHP_FUNCTION(apache_request_headers) { - apache_table_to_zval(((request_rec *)SG(server_context))->headers_in, PG(safe_mode), return_value); + apache_table_to_zval(((request_rec *)SG(server_context))->headers_in, return_value); } /* }}} */ -- cgit v1.2.1