From 6c1e03259d8b519cff3705eb54051c7a04062bf4 Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Tue, 27 Aug 2019 16:35:00 +0200 Subject: [PATCH] Fix redirect parameter for login with 2FA --- web/auth/auth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/auth/auth.go b/web/auth/auth.go index 0ed461946c6..10048321b97 100644 --- a/web/auth/auth.go +++ b/web/auth/auth.go @@ -280,6 +280,9 @@ func login(c echo.Context) error { v := url.Values{} v.Add("two_factor_token", string(twoFactorToken)) v.Add("long_run_session", strconv.FormatBool(longRunSession)) + if loc := c.FormValue("redirect"); loc != "" { + v.Add("redirect", loc) + } if wantsJSON(c) { return c.JSON(http.StatusOK, echo.Map{