Re: #19481 [NEW]: DB doesn't allow for '@' within password (p@ssword)
| From: | Alan Knowles | Date: | Wed, 18 Sep 2002 22:33:39 +0000 |
| Subject: | Re: #19481 [NEW]: DB doesn't allow for '@' within password (p@ssword) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9183@lists.php.net to get a copy of this message | ||
Martin Jansen wrote:
On Wed Sep 18, 2002 at 08:0458PM -0000, rob@euglug.org wrote:shouldnt you use urlencoded @ eg. %40 - rfc1738 indicates it's a reserved character - in which case does parse_url handle it OK? regards AlanIf 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?I guess the easiest solution would be to take the last @ in the DSN as the separator between password and host. But then I'm not sure if there's a smart way to implement this without dropping the usage of parse_url().