Re: Auth question

From: Date: Fri, 27 Sep 2002 16:21:53 +0000
Subject: Re: Auth question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2395@lists.php.net to get a copy of this message
I'm sure you already realize this, but yes, a char will pad the password with blank characters to fill the lenght. This makes the comparison very difficult. A varchar will not pad the password entry. On Thu, 2002-09-26 at 15:59, Christopher G.Morlier wrote: > Solved my own problem. Apparently, it is necessary to use a varchar field > for the database table's password column...or maybe a char(32). I had > previously used char(40) for the password. > > -Chris > > At 05:52 PM 9/26/2002 -0500, Christopher G.Morlier wrote: > >Hi Everyone, > > > >I am trying to use the Auth module, but am not having much luck. When I > >attempt to login to the page, it fails and returns to the login screen. I > >have traced all the way down to the Auth_Container_DB::fetchData function, > >where I have added several print/print_r statements to compare my > >data. The DB.php file version is 1.11. The database query completes > >successfully, and when I print out $entry[$this->options['passwordcol']] > >it looks the same as the printout of md5($password). > > > >However, the comparison on the following line comes out false. > >if ($entry[$this->options['passwordcol']] == md5($password)) > > > >Any ideas? > > > >Thanks, > >Chris > > > > > >-- > >PEAR General Mailing List (http://pear.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Brian Bell <brian.bell@twelvehorses.com>

« previous php.pear.general (#2395) next »