From:             cgreen at its dot uq dot edu dot au
Operating system: Fedora Core 1
PHP version:      Irrelevant
PHP Bug Type:     Unknown/Other Function
Bug description:  Parameters from PEAR http_proxy not unencoded

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:[EMAIL PROTECTED]@proxy.my.url.com will cause an
error because the @ symbol in [EMAIL PROTECTED] 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 bug report at http://bugs.php.net/?id=28346&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28346&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28346&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28346&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28346&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28346&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28346&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28346&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28346&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28346&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28346&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28346&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28346&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28346&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28346&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28346&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28346&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28346&r=float

Reply via email to