]> granicus.if.org Git - php/commitdiff
MFH: safe mode fix
authorUwe Schindler <thetaphi@php.net>
Tue, 15 Jul 2003 22:19:23 +0000 (22:19 +0000)
committerUwe Schindler <thetaphi@php.net>
Tue, 15 Jul 2003 22:19:23 +0000 (22:19 +0000)
sapi/nsapi/nsapi.c

index 2f01f9844a168c7053cd8a9ca742846c2fc5a9a6..44dc052037e6e67c3a74def57d69beaf0000285a 100644 (file)
@@ -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);