svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c
| From: | Xinchen Hui | Date: | Wed, 21 Sep 2011 16:00:09 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/sapi/cli/php_cli_server.c trunk/sapi/cli/php_cli_server.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66611@lists.php.net to get a copy of this message | ||
laruence Wed, 21 Sep 2011 16:00:09 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=317111
Log:
Fixed bug #55755 (SegFault when outputting header WWW-Authenticate)
Bug: https://bugs.php.net/55755 (Closed) SegFault when
outputting header WWW-Authenticate
Changed paths:
U php/php-src/branches/PHP_5_4/NEWS
U php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
U php/php-src/trunk/sapi/cli/php_cli_server.c
Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS 2011-09-21 15:14:07 UTC (rev 317110)
+++ php/php-src/branches/PHP_5_4/NEWS 2011-09-21 16:00:09 UTC (rev 317111)
@@ -15,6 +15,7 @@
. Fixed bug #55726 (Changing the working directory makes router script
inaccessible). (Laruence)
. Fixed bug #55747 (request headers missed in $_SERVER). (Laruence)
+ . Fixed bug #55755 (SegFault when outputting header WWW-Authenticate). (Laruence)
15 Sep 2011, PHP 5.4.0 Beta
- General improvements:
Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-09-21 15:14:07 UTC (rev 317110)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c 2011-09-21 16:00:09 UTC (rev 317111)
@@ -1583,6 +1583,7 @@
request_info->query_string = client->request.query_string;
request_info->post_data = client->request.content;
request_info->content_length = request_info->post_data_length =
client->request.content_len;
+ request_info->auth_user = request_info->auth_password = request_info->auth_digest = NULL;
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type",
sizeof("Content-Type"), (void**)&val)) {
request_info->content_type = *val;
}
@@ -1764,9 +1765,9 @@
{
php_cli_server_client_populate_request_info(client, &SG(request_info));
{
- zval **val;
- if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&val)) {
- php_handle_auth_data(Z_STRVAL_PP(val) TSRMLS_CC);
+ char **auth;
+ if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&auth)) {
+ php_handle_auth_data(*auth TSRMLS_CC);
}
}
SG(sapi_headers).http_response_code = 200;
@@ -1867,9 +1868,9 @@
php_cli_server_client_populate_request_info(client, &SG(request_info));
{
- zval **val;
- if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&val)) {
- php_handle_auth_data(Z_STRVAL_PP(val) TSRMLS_CC);
+ char **auth;
+ if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&auth)) {
+ php_handle_auth_data(*auth TSRMLS_CC);
}
}
SG(sapi_headers).http_response_code = 200;
Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-09-21 15:14:07 UTC (rev 317110)
+++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-09-21 16:00:09 UTC (rev 317111)
@@ -1583,6 +1583,7 @@
request_info->query_string = client->request.query_string;
request_info->post_data = client->request.content;
request_info->content_length = request_info->post_data_length =
client->request.content_len;
+ request_info->auth_user = request_info->auth_password = request_info->auth_digest = NULL;
if (SUCCESS == zend_hash_find(&client->request.headers, "Content-Type",
sizeof("Content-Type"), (void**)&val)) {
request_info->content_type = *val;
}
@@ -1764,9 +1765,9 @@
{
php_cli_server_client_populate_request_info(client, &SG(request_info));
{
- zval **val;
- if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&val)) {
- php_handle_auth_data(Z_STRVAL_PP(val) TSRMLS_CC);
+ char **auth;
+ if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&auth)) {
+ php_handle_auth_data(*auth TSRMLS_CC);
}
}
SG(sapi_headers).http_response_code = 200;
@@ -1867,9 +1868,9 @@
php_cli_server_client_populate_request_info(client, &SG(request_info));
{
- zval **val;
- if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&val)) {
- php_handle_auth_data(Z_STRVAL_PP(val) TSRMLS_CC);
+ char **auth;
+ if (SUCCESS == zend_hash_find(&client->request.headers, "Authorization",
sizeof("Authorization"), (void**)&auth)) {
+ php_handle_auth_data(*auth TSRMLS_CC);
}
}
SG(sapi_headers).http_response_code = 200;