php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28346 Parameters from PEAR http_proxy not unencoded
Submitted: 2004-05-10 10:13 UTC Modified: 2004-05-10 10:24 UTC
From: i at camerongreen dot org Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS: Fedora Core 1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
12 - 9 = ?
Subscribe to this entry?

 
 [2004-05-10 10:13 UTC] 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'];



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-10 10:15 UTC] cgreen at its dot uq dot edu dot au
fixing email address : )
 [2004-05-10 10:15 UTC] i at camerongreen dot org
fixing email address : )
 [2004-05-10 10:24 UTC] eru@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Hi,

please report your bug in the PEAR bug database, which you can usually reach under http://pear.php.net/package/Pear (for the PEAR package) or http://pear.php.net/bugs/ for general instructions.

Thanks for your interest in PHP!

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 04:01:34 2024 UTC