[sork] passwd/vpopmail

Jack Liu jackliu at firstig.com
Fri May 14 22:21:52 PDT 2004


Here's what I did to fix the problem.

in the Driver.php file, change this line:

$newPassword = "{crypt}" . crypt($newPassword);

to this:

$newPassword = crypt($newPassword);

in the vpopmail.php file, comment out these two lines:

$encrypted = substr($encrypted, 7);
$salt = substr($encrypted , 0, 2);

and change this line:

if ($encrypted == crypt($plaintext, $salt)) {

to this:

if ($encrypted == crypt($plaintext, $encrypted)) {


The encrypted string that the unmodified code was returning did not even 
come close to matching the original password in the database.  Not sure 
why it was off by so much.  Anyway,  I hope this helps!




More information about the sork mailing list