|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73754 parse_url returns false if # in password
Submitted: 2016-12-15 20:47 UTC Modified: 2016-12-16 00:23 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: byron at raventools dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.6.29 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
39 - 25 = ?
Subscribe to this entry?

 [2016-12-15 20:47 UTC] byron at raventools dot com
parse_url seems to break urls with # in password. In our case it caused ActiveRecord to start failing to connect to our mysql server who's password had a # in it. eg mysql://foo:ba#r@mysqlserver.internal:3306/mydb;charset=utf8

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-15 20:48 UTC] byron at raventools dot com
I think this is related to
 [2016-12-15 22:09 UTC] fernando at null-life dot com
You must urlencode the # now, %23 

You should have encoded it since the beginning, there's a duplicate of this issue marked as wontfix
 [2016-12-16 00:23 UTC]
-Status: Open +Status: Not a bug
 [2016-12-16 00:23 UTC]
The URL(URI) is invalid. i.e. user/pass must be URL encoded
There are other chars that must be encoded, too. e.g. ' '(space), /, :,etc
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 21:01:30 2024 UTC