Skip to content

Commit 5162c5d

Browse files
committed
WebUIs: add a nil check for token in refresh cookie method
token should never be null here because we have an authenticated user however add the same check as elsewhere Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
1 parent c2aed5e commit 5162c5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/httpd/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ func (s *httpdServer) checkCookieExpiration(w http.ResponseWriter, r *http.Reque
10011001
return
10021002
}
10031003
token, claims, err := jwtauth.FromContext(r.Context())
1004-
if err != nil {
1004+
if err != nil || token == nil {
10051005
return
10061006
}
10071007
tokenClaims := jwtTokenClaims{}

0 commit comments

Comments
 (0)