Skip to content

Commit

Permalink
WebUIs: add a nil check for token in refresh cookie method
Browse files Browse the repository at this point in the history
token should never be null here because we have an authenticated user
however add the same check as elsewhere

Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Sep 16, 2024
1 parent c2aed5e commit 5162c5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/httpd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ func (s *httpdServer) checkCookieExpiration(w http.ResponseWriter, r *http.Reque
return
}
token, claims, err := jwtauth.FromContext(r.Context())
if err != nil {
if err != nil || token == nil {
return
}
tokenClaims := jwtTokenClaims{}
Expand Down

0 comments on commit 5162c5d

Please sign in to comment.