ID: 38859 Updated by: [EMAIL PROTECTED] Reported By: schappy at mail dot ru -Status: Assigned +Status: Closed Bug Type: URL related Operating System: all PHP Version: 4.4.4 Assigned To: iliaa New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2006-09-17 11:20:29] [EMAIL PROTECTED] Ilia, please take a look at this patch: http://tony2001.phpclub.net/dev/tmp/bug38859.diff ------------------------------------------------------------------------ [2006-09-17 10:54:23] schappy at mail dot ru Description: ------------ If you specify a username/password containing a '@'-sign the parse_url will not decode the password correctly. See example below. While parsing the string, it should be used the last index of '@' to find the hostname instead of the first occurence. Reproduce code: --------------- <?php $url = 'http://user:@[EMAIL PROTECTED]/path?argument?value#etc'; print_r(parse_url($url)); ?> Array ( [scheme] => http [host] => [EMAIL PROTECTED] [user] => user [path] => /path [query] => argument?value [fragment] => etc ) Expected result: ---------------- <?php $url = 'http://user:@[EMAIL PROTECTED]/path?argument?value#etc'; print_r(parse_url($url)); ?> Array ( [scheme] => http [pass] => @pass [host] => host [user] => user [path] => /path [query] => argument?value [fragment] => etc ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38859&edit=1
