From: Uwe Schindler Date: Tue, 15 Jul 2003 22:19:00 +0000 (+0000) Subject: safe mode fix X-Git-Tag: BEFORE_ARG_INFO~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72aa28d0c37b61c7ad29b2a9a8c8289498391c71;p=php safe mode fix --- diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index 4ebe98df70..c37510848c 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -402,7 +402,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; @@ -602,7 +602,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);