cvs: php4 /ext/standard http_fopen_wrapper.c
| From: | Jani Taskinen | Date: | Thu, 11 Jul 2002 02:35:46 +0000 |
| Subject: | cvs: php4 /ext/standard http_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12771@lists.php.net to get a copy of this message | ||
sniper Wed Jul 10 22:35:46 2002 EDT
Modified files:
/php4/ext/standard http_fopen_wrapper.c
Log:
Fixed bug: #16637, username/password needs to be urlencoded.
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.35 php4/ext/standard/http_fopen_wrapper.c:1.36
--- php4/ext/standard/http_fopen_wrapper.c:1.35 Sat May 4 13:16:28 2002
+++ php4/ext/standard/http_fopen_wrapper.c Wed Jul 10 22:35:45 2002
@@ -18,7 +18,7 @@
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.35 2002/05/04 17:16:28 sas Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.36 2002/07/11 02:35:45 sniper Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -148,6 +148,10 @@
/* 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, ":");