com php-src: fix bug #67955: ext/soap/php_http.c
| From: | Tjerk Anne Meesters | Date: | Wed, 03 Sep 2014 12:35:40 +0000 |
| Subject: | com php-src: fix bug #67955: ext/soap/php_http.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81417@lists.php.net to get a copy of this message | ||
Commit: 9befa8c5f7570808dbf31004ea33534cd61b7383
Author: Philip Hofstetter <phofstetter@sensational.ch> Wed, 3 Sep 2014 14:35:40
+0200
Parents: 7ccbfb2e8467f4a5bec90209254f78ffb948755e
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9befa8c5f7570808dbf31004ea33534cd61b7383
Log:
fix bug #67955
this fixes a regression from 6c2a8068207a02b3d7ae7416a9967dad0a81e61f.
smart_str_appendl is expecting the length as the length of the string,
but key_length is the byte length of the key, including the 0
terminator.
As such, the cookie name appeneded to the header would now also include
the 0 terminator of the key name which then would be sent to the server.
Bugs:
https://bugs.php.net/67955
Changed paths:
M ext/soap/php_http.c
Diff:
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 2a5679a..4a5829f 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -830,7 +830,7 @@ try_again:
(zend_hash_index_find(Z_ARRVAL_PP(data), 2, (void**)&tmp) == FAILURE ||
in_domain(phpurl->host,Z_STRVAL_PP(tmp))) &&
(use_ssl || zend_hash_index_find(Z_ARRVAL_PP(data), 3, (void**)&tmp) == FAILURE)) {
- smart_str_appendl(&soap_headers, key, key_len);
+ smart_str_appendl(&soap_headers, key, key_len-1);
smart_str_appendc(&soap_headers, '=');
smart_str_appendl(&soap_headers, Z_STRVAL_PP(value), Z_STRLEN_PP(value));
smart_str_appendc(&soap_headers, ';');