#50484 [Opn->Bgs]: parse_url can't handle with url, where password part contains slash "/"

From: Date: Wed, 16 Dec 2009 02:43:48 +0000
Subject: #50484 [Opn->Bgs]: parse_url can't handle with url, where password part contains slash "/"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145773@lists.php.net to get a copy of this message
ID: 50484 Updated by: aharvey@php.net Reported By: max dot antonoff at gmail dot com -Status: Open +Status: Bogus Bug Type: URL related Operating System: Linux 2.6.31 PHP Version: 5.3.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php parse_url is behaving per the spec here, since RFC 3986 doesn't allow slash characters within the userinfo component of the URL: slashes need to be percent-encoded to be used. Previous Comments: ------------------------------------------------------------------------ [2009-12-15 21:13:43] max dot antonoff at gmail dot com Description: ------------ parse_url can not handle password part, if it contains slash. Reproduce code: --------------- php -r "print_r(parse_url('test://fuuu:de/st@folsd/lala?fio=9&slsl=290sk'));" Array ( [scheme] => test [host] => fuuu [path] => /st@folsd/lala [query] => fio=9&slsl=290sk ) Expected result: ---------------- Array ( [scheme] => test [host] => folsd [user] => fuuu [pass] => de/st [path] => /lala [query] => fio=9&slsl=290sk ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50484&edit=1

« previous php.bugs (#145773) next »