From: foobar Date: Thu, 11 Jul 2002 02:35:45 +0000 (+0000) Subject: Fixed bug: #16637, username/password needs to be urlencoded. X-Git-Tag: dev~365 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8f5edec93e512df655ac4eb45d3118e94bd1be6;p=php Fixed bug: #16637, username/password needs to be urlencoded. --- diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 5ba1876e68..3ff9d0edc9 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -148,6 +148,10 @@ php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, ch /* authz header if it was specified */ 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 */ strcpy(scratch, resource->user); strcat(scratch, ":");