bug in Auth (?)
| From: | Jeroen Houben | Date: | Fri, 11 Apr 2003 13:44:45 +0000 |
| Subject: | bug in Auth (?) | ||
| Groups: | php.pear.dev php.pear.general | ||
| Request: | Send a blank email to pear-dev+get-15112@lists.php.net to get a copy of this message | ||
Hi Martin,
I'm switching from MySql to PostgreSQL and PEAR::Auth keeps throwing "wrong username and password" at me. After some investigation I found out that postgres returns extra spaces in char fields, the results aren't trimmed.
I changed the source for Container/DB.php on line 217 like this:
if (is_array($entry)) {
if ($this->verifyPassword(trim($password),
trim($entry[$this->options['passwordcol']]),
$this->options['cryptType']))
{
$res->free();
That works.
Can you apply this patch, or should I (as the user) just make sure my database returns trimmed results?
TIA
Jeroen
btw is something wrong at php.net, I don't seem to be receiving any mail on the PEAR mailinglists..