X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1c385c602908735c3be266b1470b301050650fd3..7d42e17604bad106b796c4f475a5d7692388a130:/SL/Auth/Password.pm diff --git a/SL/Auth/Password.pm b/SL/Auth/Password.pm index 5a17203c5..5f876cec3 100644 --- a/SL/Auth/Password.pm +++ b/SL/Auth/Password.pm @@ -40,7 +40,15 @@ sub hash_if_unhashed { my ($algorithm, $password) = $class->parse($params{password}, 'NONE'); - return $algorithm eq 'NONE' ? $class->hash(%params) : $params{password}; + return $params{password} unless $algorithm eq 'NONE'; + + if ($params{look_up_algorithm}) { + my $stored_password = $params{auth}->get_stored_password($params{login}); + my ($stored_algorithm) = $class->parse($stored_password); + $params{algorithm} = $stored_algorithm; + } + + return $class->hash(%params); } sub parse {