mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 15:10:23 +00:00
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>
This commit is contained in:
parent
c2aed5ee92
commit
5162c5de87
1 changed files with 1 additions and 1 deletions
|
@ -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{}
|
||||
|
|
Loading…
Reference in a new issue