|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: byron at raventools dot com
New email:
PHP Version: OS:


 [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 22:01:28 2024 UTC