]> granicus.if.org Git - php/commitdiff
Remove hiding of authorization headers completely because safe mode canceled
authorUwe Schindler <thetaphi@php.net>
Sat, 29 Apr 2006 21:50:17 +0000 (21:50 +0000)
committerUwe Schindler <thetaphi@php.net>
Sat, 29 Apr 2006 21:50:17 +0000 (21:50 +0000)
sapi/nsapi/nsapi.c

index 03d310e4d0c0bda33eaf6d46d3a5fe06a1cffbd7..566934e315865e90e48bdd693dd523191af6a687 100644 (file)
@@ -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;
                }
        }