mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fixed bug: #16637, username/password needs to be urlencoded.
This commit is contained in:
parent
0790c58f96
commit
c8f5edec93
1 changed files with 4 additions and 0 deletions
|
@ -148,6 +148,10 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, ch
|
||||||
|
|
||||||
/* authz header if it was specified */
|
/* authz header if it was specified */
|
||||||
if (resource->user && resource->pass) {
|
if (resource->user && resource->pass) {
|
||||||
|
/* decode the strings first */
|
||||||
|
php_url_decode(resource->user, strlen(resource->user));
|
||||||
|
php_url_decode(resource->pass, strlen(resource->pass));
|
||||||
|
|
||||||
/* scratch is large enough, since it was made large enough for the whole URL */
|
/* scratch is large enough, since it was made large enough for the whole URL */
|
||||||
strcpy(scratch, resource->user);
|
strcpy(scratch, resource->user);
|
||||||
strcat(scratch, ":");
|
strcat(scratch, ":");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue