Re: bug in Auth (?)

From: Date: Fri, 11 Apr 2003 13:50:56 +0000
Subject: Re: bug in Auth (?)
References: 1  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-15113@lists.php.net to get a copy of this message
Hi Jeroen, Are you sure you haven't created the username column in postgres as one with a fixed char length? In that case postgres may be padding your usernames with whitespaces... Anyway, the question why postgres is giving you strings with whitespace is probably the most important one.. Hans On Fri, 11 Apr 2003, Jeroen Houben wrote: > 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.. > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.dev (#15113) next »