Skip to content

Commit

Permalink
core/token: fix panic looking up invalid batch tokens (#11415) (#11417)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf committed Apr 20, 2021
1 parent 6977c11 commit 9171422
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vault/token_store.go
Expand Up @@ -1162,6 +1162,9 @@ func (ts *TokenStore) lookupBatchToken(ctx context.Context, id string) (*logical
if err != nil {
return nil, err
}
if te == nil {
return nil, nil
}

if time.Now().After(time.Unix(te.CreationTime, 0).Add(te.TTL)) {
return nil, nil
Expand Down

0 comments on commit 9171422

Please sign in to comment.