#19481 [Ana->Bgs]: DB doesn't allow for '@' within password (p@ssword)
| From: | iliaa@php.net | Date: | Tue, 29 Oct 2002 05:08:45 +0000 |
| Subject: | #19481 [Ana->Bgs]: DB doesn't allow for '@' within password (p@ssword) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10316@lists.php.net to get a copy of this message | ||
ID: 19481
Updated by: iliaa@php.net
Reported By: rob@euglug.org
-Status: Analyzed
+Status: Bogus
Bug Type: PEAR related
Operating System: Linux
PHP Version: 4.2.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
If your password contains non-alphanumeric characters do a urlencode()
on the value before passing it if you are using the
"mysql://foo:bar+@localhost/foo" format to pass data to DB::connect();
Previous Comments:
------------------------------------------------------------------------
[2002-10-02 19:02:00] alan@akbkhome.com
you can rawurlencode the @ sign %40
username = xxx
password = yy@yy
dns = mysql://xxx:yy%40yy@localhost/mydb
If the dsn is to follow 'http url standards' (eg. the rfc), then there
is no need to change the code.. (just need to document it somewhere)
------------------------------------------------------------------------
[2002-10-02 04:37:04] mj@php.net
Please provide us your patch and we'll see.
------------------------------------------------------------------------
[2002-09-18 15:04:58] rob@euglug.org
If you have an '@' in your password, DB.php parses that as the token
that separates the user:pass@host of the DSN. It should preferrably
allow passwords with '@'.
I can send a patch, but what is the preferred way of handling something
like this? Asking the user to put the pass in quotes? Or somehow
determining what is the separator token and what is the password?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19481&edit=1