Merge pull request #1635 from nats-io/sys-acc-rev-fix

Skip revocation check if the client has no jwt and is therefore internal
This commit is contained in:
Ivan Kozlovic
2020-10-09 12:57:15 -06:00
committed by GitHub

View File

@@ -2654,7 +2654,7 @@ func (s *Server) updateAccountClaimsWithRefresh(a *Account, ac *jwt.AccountClaim
theJWT := c.opts.JWT
c.mu.Unlock()
// Check for being revoked here. We use ac one to avoid the account lock.
if ac.Revocations != nil {
if ac.Revocations != nil && theJWT != "" {
if juc, err := jwt.DecodeUserClaims(theJWT); err != nil {
c.Debugf("User JWT not valid: %v", err)
c.authViolation()