From: Uwe Schindler Date: Tue, 15 Jul 2003 22:19:23 +0000 (+0000) Subject: MFH: safe mode fix X-Git-Tag: php-4.3.3RC2~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dff2f35098fb508fe6c35696a7edaf14f169e8b3;p=php MFH: safe mode fix --- diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 2f01f9844a..44dc052037 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -407,7 +407,7 @@ PHP_FUNCTION(nsapi_request_headers) for (i=0; i < rc->rq->headers->hsize; i++) { entry=rc->rq->headers->ht[i]; while (entry) { - if (!PG(safe_mode) || strcasecmp(entry->param->name, "authorization")) { + if (!PG(safe_mode) || strncasecmp(entry->param->name, "authorization", 13)) { add_assoc_string(return_value, entry->param->name, entry->param->value, 1); } entry=entry->next; @@ -607,7 +607,7 @@ 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 (!PG(safe_mode) || strcasecmp(entry->param->name, "authorization")) { + if (!PG(safe_mode) || strncasecmp(entry->param->name, "authorization", 13)) { snprintf(buf, NS_BUF_SIZE, "HTTP_%s", entry->param->name); for(p = buf + 5; *p; p++) { *p = toupper(*p);