Skip to content

Commit

Permalink
fix: oversight error on redirect target
Browse files Browse the repository at this point in the history
  • Loading branch information
spacehamster87 committed Nov 28, 2024
1 parent f89b5cd commit 2aef6ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2aef6ed

Please sign in to comment.