From a21cec5283b01032d217d88745186080f49c9f16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 25 Oct 2019 15:07:46 +0200 Subject: [PATCH] Login: Callback nur bauen bei GET-Request und wenn action vorhanden --- SL/Dispatcher.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); } -- 2.20.1