setting the default for encrypt_ldap() to des and not just return false, the default is needed if you never saved setup >> config

This commit is contained in:
Ralf Becker 2006-06-17 16:04:35 +00:00
parent 4d200374a2
commit 5dc4617462

View File

@ -134,6 +134,7 @@
$salt = '';
switch($type)
{
default: // eg. setup >> config never saved
case 'des':
$salt = $this->randomstring(2);
$_password = crypt($password, $salt);
@ -170,8 +171,6 @@
$hash = mhash(MHASH_SHA1, $password . $salt);
$e_password = '{SSHA}' . base64_encode($hash . $salt);
break;
default:
return False;
}
return $e_password;
}