Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b5d03350

Von Bernd Bleßmann vor mehr als 5 Jahren hinzugefügt

  • ID b5d03350fc9dd6e06af2c045412aef8acc55dca5
  • Vorgänger ce43137f
  • Nachfolger b7e60011

Login: Callback setzen bei Session-Timeout

Unterschiede anzeigen:

SL/Dispatcher.pm
30 30
use SL::Form;
31 31
use SL::Helper::DateTime;
32 32
use SL::InstanceConfiguration;
33
use SL::MoreCommon qw(uri_encode);
33 34
use SL::Template::Plugin::HTMLFixes;
34 35
use SL::User;
35 36

  
......
291 292
    if (   (($script eq 'login') && !$action)
292 293
        || ($script eq 'admin')
293 294
        || (SL::Auth::SESSION_EXPIRED() == $session_result)) {
294
      $self->redirect_to_login(script => $script, error => 'session');
295

  
295
      $self->redirect_to_login(routing_type => $routing_type,
296
                               script       => $script,
297
                               controller   => $script_name,
298
                               action       => $action,
299
                               error        => 'session');
296 300
    }
297 301

  
298 302
    my %auth_result = $self->{auth_handler}->handle(
......
365 369
  my $action          = ($params{script} // '') =~ m/^admin/i ? 'Admin/login' : 'LoginScreen/user_login';
366 370
  $action            .= '&error=' . $params{error} if $params{error};
367 371

  
368
  print $::request->cgi->redirect("controller.pl?action=${action}");
372
  my $redirect_url = "controller.pl?action=${action}";
373

  
374
  if ($action =~ m/LoginScreen\/user_login/) {
375
    require SL::Controller::Base;
376
    my $controller = SL::Controller::Base->new;
377

  
378
    delete $params{error};
379
    delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } };
380
    my $callback   = $controller->url_for(%params, %{$::form});
381
    $redirect_url .= '&callback=' . uri_encode($callback);
382
  }
383

  
384
  print $::request->cgi->redirect($redirect_url);
369 385
  $self->end_request;
370 386
}
371 387

  

Auch abrufbar als: Unified diff