]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Dispatcher.pm
Keine Passwörter mehr in Sessions speichern.
[mfinanz.git] / SL / Dispatcher.pm
index e9f7dac09a7d13ba93530f497165607509535fa8..21398ccca72671947e279bd6a228a926b32c06d4 100644 (file)
@@ -68,7 +68,6 @@ sub show_error {
   $::form->{error}         = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
   $::form->{error}         = $::locale->text('Incorrect password!.')                   if ($error_type eq 'password');
   $::myconfig{countrycode} = $::lx_office_conf{system}->{language};
-  $::form->{stylesheet}    = 'css/lx-office-erp.css';
 
   $::form->header;
   print $::form->parse_html_template($template);
@@ -205,15 +204,18 @@ sub handle_request {
 
     } else {
       show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
-      %::myconfig = $::auth->read_user($::form->{login});
+
+      my $login = $::auth->get_session_value('login');
+      show_error('login/password_error', 'password') if not defined $login;
+
+      %::myconfig = $::auth->read_user(login => $login);
 
       show_error('login/password_error', 'password') unless $::myconfig{login};
 
       $::locale = Locale->new($::myconfig{countrycode});
 
-      show_error('login/password_error', 'password') if SL::Auth::OK != $::auth->authenticate($::form->{login}, $::form->{password});
+      show_error('login/password_error', 'password') if SL::Auth::OK != $::auth->authenticate($login, undef);
 
-      $::auth->store_credentials_in_session(login => $::form->{login}, password => $::form->{password});
       $::auth->create_or_refresh_session;
       $::auth->delete_session_value('FLASH');
       delete $::form->{password};
@@ -221,7 +223,7 @@ sub handle_request {
       if ($action) {
         $::instance_conf->init;
 
-        map { $::form->{$_} = $::myconfig{$_} } qw(stylesheet charset)
+        map { $::form->{$_} = $::myconfig{$_} } qw(charset)
           unless $action eq 'save' && $::form->{type} eq 'preferences';
 
         $::form->set_standard_title;
@@ -374,7 +376,6 @@ sub _check_for_old_config_files {
   return unless @old_files;
 
   $::form->{title}      = $::locale->text('Old configuration files');
-  $::form->{stylesheet} = 'lx-office-erp.css';
   $::form->header;
   print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files });