#28346 [Opn]: Parameters from PEAR http_proxy not unencoded
| From: | i at camerongreen dot org | Date: | Mon, 10 May 2004 08:15:34 +0000 |
| Subject: | #28346 [Opn]: Parameters from PEAR http_proxy not unencoded | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59460@lists.php.net to get a copy of this message | ||
ID: 28346
User updated by: i at camerongreen dot org
-Reported By: cgreen at its dot uq dot edu dot au
+Reported By: i at camerongreen dot org
Status: Open
Bug Type: Unknown/Other Function
Operating System: Fedora Core 1
PHP Version: Irrelevant
New Comment:
fixing email address : )
Previous Comments:
------------------------------------------------------------------------
[2004-05-10 10:15:17] cgreen at its dot uq dot edu dot au
fixing email address : )
------------------------------------------------------------------------
[2004-05-10 10:13:46] i at camerongreen dot org
Description:
------------
The Remote.php class in the PEAR installer does not urldecode
parameters after it parses the URL.
This means that if a password contains the wrong characters, it will
not work. For instance http://username:p@ssword@proxy.my.url.com will
cause an error because the @ symbol in p@ssword will confuse it.
You therefore need to urlencode the @ to %40, and after parse_url has
seperated it in the code, urldecode it.
Cheerio,
Cameron
Reproduce code:
---------------
Easy fix...
% diff /usr/local/php-5-0-0rc1/lib/php/PEAR/Remote.php
/usr/local/php-5-0-0rc1/lib/php/PEAR/Remote.php.old
138,139c138,139
< $proxy_user = urldecode(@$proxy['user']);
< $proxy_pass = urldecode(@$proxy['pass']);
---
> $proxy_user = @$proxy['user'];
> $proxy_pass = @$proxy['pass'];
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28346&edit=1