From c9156346eb4e2723207880d71ddc8c7228c2ace8 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sat, 29 Apr 2006 21:50:17 +0000 Subject: [PATCH] Remove hiding of authorization headers completely because safe mode canceled --- sapi/nsapi/nsapi.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 03d310e4d0..566934e315 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -410,9 +410,7 @@ PHP_FUNCTION(nsapi_request_headers) for (i=0; i < rc->rq->headers->hsize; i++) { entry=rc->rq->headers->ht[i]; while (entry) { - if (strncasecmp(entry->param->name, "authorization", 13)) { - add_assoc_string(return_value, entry->param->name, entry->param->value, 1); - } + add_assoc_string(return_value, entry->param->name, entry->param->value, 1); entry=entry->next; } } @@ -602,23 +600,21 @@ static void sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_D for (i=0; i < rc->rq->headers->hsize; i++) { entry=rc->rq->headers->ht[i]; while (entry) { - if (strncasecmp(entry->param->name, "authorization", 13)) { - if (strcasecmp(entry->param->name, "content-length")==0 || strcasecmp(entry->param->name, "content-type")==0) { - strlcpy(buf, entry->param->name, NS_BUF_SIZE); - pos = 0; - } else { - snprintf(buf, NS_BUF_SIZE, "HTTP_%s", entry->param->name); - pos = 5; - } - buf[NS_BUF_SIZE]='\0'; - for(p = buf + pos; *p; p++) { - *p = toupper(*p); - if (*p < 'A' || *p > 'Z') { - *p = '_'; - } + if (strcasecmp(entry->param->name, "content-length")==0 || strcasecmp(entry->param->name, "content-type")==0) { + strlcpy(buf, entry->param->name, NS_BUF_SIZE); + pos = 0; + } else { + snprintf(buf, NS_BUF_SIZE, "HTTP_%s", entry->param->name); + pos = 5; + } + buf[NS_BUF_SIZE]='\0'; + for(p = buf + pos; *p; p++) { + *p = toupper(*p); + if (*p < 'A' || *p > 'Z') { + *p = '_'; } - php_register_variable(buf, entry->param->value, track_vars_array TSRMLS_CC); } + php_register_variable(buf, entry->param->value, track_vars_array TSRMLS_CC); entry=entry->next; } } -- 2.40.0