thetaphi Sat Apr 29 21:50:17 2006 UTC Modified files: /php-src/sapi/nsapi nsapi.c Log: Remove hiding of authorization headers completely because safe mode canceled http://cvs.php.net/viewcvs.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.73&r2=1.74&diff_format=u Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.73 php-src/sapi/nsapi/nsapi.c:1.74 --- php-src/sapi/nsapi/nsapi.c:1.73 Tue Mar 7 14:43:16 2006 +++ php-src/sapi/nsapi/nsapi.c Sat Apr 29 21:50:17 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nsapi.c,v 1.73 2006/03/07 14:43:16 iliaa Exp $ */ +/* $Id: nsapi.c,v 1.74 2006/04/29 21:50:17 thetaphi Exp $ */ /* * PHP includes @@ -310,7 +310,7 @@ PHP_MINFO_FUNCTION(nsapi) { php_info_print_table_start(); - php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.73 $"); + php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.74 $"); php_info_print_table_row(2, "Server Software", system_version()); php_info_print_table_row(2, "Sub-requests with nsapi_virtual()", (nsapi_servact_service)?((zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0))?"not supported with zlib.output_compression":"enabled"):"not supported on this platform" ); @@ -410,9 +410,7 @@ 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 @@ 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; } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php