Skip to content

Commit

Permalink
use more specific path for cookie
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Jan 6, 2025
1 parent 383fee0 commit 171fc49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hscontrol/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func (a *AuthProviderOIDC) OIDCCallbackHandler(
return
}

log.Debug().Interface("cookies", req.Cookies()).Msg("Received oidc callback")
cookieState, err := req.Cookie("state")
if err != nil {
http.Error(writer, "state not found", http.StatusBadRequest)
Expand Down Expand Up @@ -627,7 +628,7 @@ func setCSRFCookie(w http.ResponseWriter, r *http.Request, name string) (string,
}

c := &http.Cookie{
Path: "/",
Path: "/oidc/callback",
Name: name,
Value: val,
MaxAge: int(time.Hour.Seconds()),
Expand Down

0 comments on commit 171fc49

Please sign in to comment.