Bug #73754 [Opn->Nab]: parse_url returns false if # in password

From: Date: Fri, 16 Dec 2016 00:23:54 +0000
Subject: Bug #73754 [Opn->Nab]: parse_url returns false if # in password
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206047@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73754&edit=1 ID: 73754 Updated by: yohgaki@php.net Reported by: byron at raventools dot com Summary: parse_url returns false if # in password -Status: Open +Status: Not a bug Type: Bug Package: URL related Operating System: Linux PHP Version: 5.6.29 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2016-12-15 22:09:10] 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-15 20:48:03] byron at raventools dot com I think this is related to https://bugs.php.net/bug.php?id=73192 ------------------------------------------------------------------------ [2016-12-15 20:47:14] byron at raventools dot com Description: ------------ 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: --------------- <?php var_dump(parse_url("mysql://foo:ba#r@mysqlserver.internal:3306/mydb;charset=utf8")); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73754&edit=1

« previous php.bugs (#206047) next »