|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50484 parse_url can't handle with url, where password part contains slash "/"
Submitted: 2009-12-15 21:13 UTC Modified: 2009-12-16 02:43 UTC
From: max dot antonoff at gmail dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.3.1 OS: Linux 2.6.31
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: max dot antonoff at gmail dot com
New email:
PHP Version: OS:


 [2009-12-15 21:13 UTC] max dot antonoff at gmail dot com
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'));"
    [scheme] => test
    [host] => fuuu
    [path] => /st@folsd/lala
    [query] => fio=9&slsl=290sk

Expected result:
    [scheme] => test
    [host] => folsd
    [user] => fuuu
    [pass] => de/st
    [path] => /lala
    [query] => fio=9&slsl=290sk


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-16 02:43 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 11:01:30 2024 UTC