|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73595 parse_url fails if passing '#' in passwd
Submitted: 2016-11-23 20:24 UTC Modified: 2016-11-23 20:38 UTC
From: dakusan at castledragmire dot com Assigned:
Status: Duplicate Package: URL related
PHP Version: 5.6.28 OS: Linux
Private report: No CVE-ID: None
 [2016-11-23 20:24 UTC] dakusan at castledragmire dot com
I believe this happened in commit "f0f68c72744a42a1c376a832dd01c012c0929e88". The reason I am considering this a bug is that it broke expected behavior in a minor version change.

Test script:

Expected result:
array(5) { ["scheme"]=> string(5) "mysql" ["host"]=> string(9) "localhost" ["user"]=> string(8) "username" ["pass"]=> string(7) "xxx#xxx" ["path"]=> string(13) "/databasename" } 

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-23 20:38 UTC]
-Status: Open +Status: Duplicate
 [2016-11-23 20:38 UTC]
Allowing # like that was a bug - security bug, no less - which is why it was fixed. You should be urlencode()ing the password.

See also bug #73500
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 25 21:01:29 2024 UTC