From: Bernd Bleßmann Date: Fri, 25 Oct 2019 13:07:46 +0000 (+0200) Subject: Login: Callback nur bauen bei GET-Request und wenn action vorhanden X-Git-Tag: release-3.5.6.1~413 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a21cec5283b01032d217d88745186080f49c9f16;p=kivitendo-erp.git Login: Callback nur bauen bei GET-Request und wenn action vorhanden --- diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index af9bdc052..16337b24e 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -399,12 +399,18 @@ sub handle_login_error { my $redirect_url = "controller.pl?action=${action}"; - if ($action =~ m/LoginScreen\/user_login/) { + if ( $action =~ m/LoginScreen\/user_login/ + && $params{action} + && 'get' eq lc($ENV{REQUEST_METHOD}) + ) { + require SL::Controller::Base; my $controller = SL::Controller::Base->new; delete $params{error}; + delete $params{routing_type}; delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } }; + my $callback = $controller->url_for(%params, %{$::form}); $redirect_url .= '&callback=' . uri_encode($callback); }