Revision 0e451e1b
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/Dispatcher/AuthHandler/Admin.pm | ||
---|---|---|
8 | 8 |
sub handle { |
9 | 9 |
%::myconfig = (); |
10 | 10 |
|
11 |
return if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK()); |
|
12 |
return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK()); |
|
11 |
return 1 if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK());
|
|
12 |
return 1 if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK());
|
|
13 | 13 |
|
14 | 14 |
$::request->{layout} = SL::Layout::Dispatcher->new(style => 'admin'); |
15 | 15 |
|
16 | 16 |
$::auth->punish_wrong_login; |
17 | 17 |
$::auth->delete_session_value('admin_password'); |
18 | 18 |
SL::Dispatcher::show_error('admin/adminlogin', 'password'); |
19 |
|
|
20 |
return 0; |
|
19 | 21 |
} |
20 | 22 |
|
21 | 23 |
1; |
Auch abrufbar als: Unified diff
Nach fehlgeschlagenem AuthHandler Request nicht fortsetzen
Ansonsten wird zwar der '302'-Redirect ausgegeben, der Controller aber
trotzdem ausgeführt.