diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-03-07 14:43:16 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-03-07 14:43:16 +0000 |
| commit | 87c4a01b87608b7abc12c8258aad8b052b8c5a67 (patch) | |
| tree | dc35256a74db923ef9654a37df35df54c65f21de /sapi/apache_hooks/php_apache.c | |
| parent | d88e3ee93d58acdc2fb6192e0f44e14d631494d0 (diff) | |
| download | php-git-87c4a01b87608b7abc12c8258aad8b052b8c5a67.tar.gz | |
Nuke safe_mode from sapi/*
# only main/ remains at this point, this is the next step
Diffstat (limited to 'sapi/apache_hooks/php_apache.c')
| -rw-r--r-- | sapi/apache_hooks/php_apache.c | 13 |
1 files changed, 6 insertions, 7 deletions
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); } /* }}} */ |
