fix: oversight error on redirect target

This commit is contained in:
Christoph Kluge 2024-11-28 15:18:07 +01:00
parent f89b5cd2ec
commit 2aef6ed9c0

View File

@ -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
}