[dev] crypt-md5 and passwd Driver.php

Chuck Hagenbuch chuck at horde.org
Tue Feb 10 12:33:23 PST 2004


Quoting Vilius Sumskas <vilius at lnk.lt>:

> it's seems that i can't change passwords in mysql (using crypt-md5 algoritm).
> After some research i found that comparePasswords function incorrectly
> compares passwords. By default it compares plaintext against encrypted.
>
>    function comparePasswords($encrypted, $plaintext)
>    {
>        return ($plaintext == Auth::getCryptedPassword($plaintext, .....
>            PEAR::raiseError(_("Incorrect Password"));
>    }
>
>
> setting it to $encrypted == Auth::getCryptedPassword($plaintext.... 
> solves the problem, but this is bad solution i think. Looking forward for the 
> patch.

Not sure why that's a bad solution - looks like I just made a silly logic error.
Fixed in CVS.

-chuck

--
"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."


More information about the dev mailing list