From 2aef6ed9c0170a1b4fcddef87525e135888bab76 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Thu, 28 Nov 2024 15:18:07 +0100 Subject: [PATCH] fix: oversight error on redirect target --- internal/auth/auth.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/auth/auth.go b/internal/auth/auth.go index a186cf6..43f7ec3 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -240,9 +240,10 @@ func (auth *Authentication) Login( if r.FormValue("redirect") != "" { http.RedirectHandler(r.FormValue("redirect"), http.StatusFound).ServeHTTP(rw, r.WithContext(ctx)) - } else { - http.RedirectHandler(r.FormValue("/"), http.StatusFound).ServeHTTP(rw, r.WithContext(ctx)) + return } + + http.RedirectHandler("/", http.StatusFound).ServeHTTP(rw, r.WithContext(ctx)) return }