X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAuth%2FDB.pm;h=0bbc050166466d7a419ab4dfbdf7368af544894e;hb=32f83e8e1c88c04cd9a8686d8482b1473a9d73c5;hp=520e3e272f3b3e8bcdb9a2b4557ad904eecf8a2f;hpb=d3d6cb31bbeec3a6eba3ff41990a2748303f5851;p=kivitendo-erp.git diff --git a/SL/Auth/DB.pm b/SL/Auth/DB.pm index 520e3e272..0bbc05016 100644 --- a/SL/Auth/DB.pm +++ b/SL/Auth/DB.pm @@ -25,6 +25,10 @@ sub new { return $self; } +sub reset { + # nothing to do here +} + sub authenticate { $main::lxdebug->enter_sub(); @@ -40,7 +44,7 @@ sub authenticate { # passwords. Hash it for easier comparison. $stored_password = SL::Auth::Password->hash(password => $stored_password) unless $stored_password; ($algorithm, $stored_password) = SL::Auth::Password->parse($stored_password); - ($algorithm2, $password) = SL::Auth::Password->parse(SL::Auth::Password->hash_if_unhashed(password => $password, algorithm => $algorithm, login => $login)); + ($algorithm2, $password) = SL::Auth::Password->parse(SL::Auth::Password->hash(password => $password, algorithm => $algorithm, login => $login)); $main::lxdebug->leave_sub(); @@ -70,7 +74,7 @@ sub change_password { return ERR_BACKEND; } - $password = SL::Auth::Password->hash(password => $password) unless $is_crypted; + $password = SL::Auth::Password->hash(login => $login, password => $password) unless $is_crypted; do_query($main::form, $dbh, qq|UPDATE auth."user" SET password = ? WHERE login = ?|, $password, $login);