#45701 [NEW]: curl_setopt and CURLOPT_URL detecting wrong username, password, and host..
| From: | sergiocrz at hotmail dot com | Date: | Sun, 03 Aug 2008 14:30:06 +0000 |
| Subject: | #45701 [NEW]: curl_setopt and CURLOPT_URL detecting wrong username, password, and host.. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-127550@lists.php.net to get a copy of this message | ||
From: sergiocrz at hotmail dot com
Operating system: XP
PHP version: 5.2.6
PHP Bug Type: cURL related
Bug description: curl_setopt and CURLOPT_URL detecting wrong username, password, and host..
Description:
------------
Using
curl_setopt($ch, CURLOPT_URL,
"ftp://$ftp_user_name:$ftp_pass@$ftp_ip:$ftp_port$path/");
PHP CURL will connect to the wrong ftp ip/host if the username or password
contains an "@" and there is no way to force it using the correct values.
Reproduce code:
---------------
$ftp_user_name = "jo@na";
$ftp_pass "bujona";
$ftp_ip = "19.16.144.123";
$ftp_port = "21";
$path = "";
curl_setopt($ch, CURLOPT_URL,
"ftp://$ftp_user_name:$ftp_pass@$ftp_ip:$ftp_port$path/");
Expected result:
----------------
PHP CURL connecting to "ftp://jo@na:bujona@19.16.144.123:21"
Actual result:
--------------
PHP CURL uses "na:bujona@19.16.144.123" as ip/hostname
Is there any way to solve this bug?
thank you
--
Edit bug report at http://bugs.php.net/?id=45701&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45701&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45701&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45701&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45701&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45701&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45701&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45701&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45701&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45701&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45701&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45701&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45701&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45701&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45701&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45701&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45701&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45701&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45701&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45701&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45701&r=mysqlcfg