X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a1ea659fc8d83ea24f7ba863c82322ae41131007..74c1545e0376bc76dcd51155afdcbfc44b6910c3:/SL/Auth.pm diff --git a/SL/Auth.pm b/SL/Auth.pm index 2323a2841..9f2475fd8 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -168,8 +168,8 @@ sub authenticate_root { return ERR_PASSWORD; } - $password = SL::Auth::Password->hash(login => 'root', password => $password); my $admin_password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->()); + $password = SL::Auth::Password->hash(login => 'root', password => $password, stored_password => $admin_password); my $result = $password eq $admin_password ? OK : ERR_PASSWORD; $self->set_session_value(SESSION_KEY_ROOT_AUTH() => $result); @@ -1120,7 +1120,7 @@ sub _parse_rights_string { push @{$cur_ary}, $token; } else { - push @{$cur_ary}, $self->{RIGHTS}->{$login}->{$token} * 1; + push @{$cur_ary}, ($self->{RIGHTS}->{$login}->{$token} // 0) * 1; } }