Skip to content

Commit

Permalink
handle state failing to parse
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Feb 21, 2024
1 parent 7d05893 commit a5fad3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/outpost/proxyv2/application/utils.go
Expand Up @@ -75,6 +75,10 @@ func (a *Application) redirectToStart(rw http.ResponseWriter, r *http.Request) {
func (a *Application) redirect(rw http.ResponseWriter, r *http.Request) {
fallbackRedirect := a.proxyConfig.ExternalHost
state := a.stateFromRequest(r)
if state == nil {
rw.WriteHeader(http.StatusBadRequest)
return
}
if state.Redirect == "" {
state.Redirect = fallbackRedirect
}
Expand Down

0 comments on commit a5fad3d

Please sign in to comment.