Re: md5() with rand() || Strange results, need help....
| From: | CF High | Date: | Fri, 14 May 2004 02:31:04 +0000 |
| Subject: | Re: md5() with rand() || Strange results, need help.... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186191@lists.php.net to get a copy of this message | ||
Their receiving the $plain_pass
$plain_pass is md5'd on login submit, so we should get md5($plain_pass ) =
db stored md5'd($plain_pass ).
Makes no sense at all.
Got a couple hundred emails in my inbox from users not able to login -- I'm
basically screwed ;--(
--Noah
"Curt Zirzow" <php-general@zirzow.dyndns.org> wrote in message
news:20040514021329.GV29423@bagend.shire...
> * Thus wrote CF High (noah@newminddesign.com):
> >
> > $username = strip_illegals($_POST['email']);
> > $plain_pass = rand();
> > $password = md5($plain_pass);
> >
> > I then insert their login info into our member's table.
> >
> > Unexpectedly, when users attempt to login no matching record is found.
>
> Are you sending them the $plain_pass or $password?
>
> > Their login submits two post fields (username & password):
> >
> > $username = trim(strtolower($_POST['username']));
> > $password = trim(strtolower($_POST['password'));
> > $password = md5($password);
> >
> > The username matches, but the password does not -- I've echoed the md5'd
> > submitted password & maddenlingly, it doesn't match.
>
> Other wise I'm reading this to say your system is evaluating
>
> md5('foo') != md5('foo')
>
> as being true.
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."