X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/670f76a86aaf642bf1a6b5b37cdc023f8fdfc79c..c6a27f90a8e644ed00910aeddaff38c74b513032:/SL/Dispatcher/AuthHandler/Admin.pm diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm index 7b194ff04..77202e8e4 100644 --- a/SL/Dispatcher/AuthHandler/Admin.pm +++ b/SL/Dispatcher/AuthHandler/Admin.pm @@ -7,10 +7,12 @@ use parent qw(Rose::Object); sub handle { %::myconfig = (); - return if $::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK(); + return if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK()); + return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK()); + $::auth->punish_wrong_login; $::auth->delete_session_value('admin_password'); - SL::Dispatcher::show_error('login/password_error', 'password', is_admin => 1); + SL::Dispatcher::show_error('admin/adminlogin', 'password'); } 1;