Skip to content

Commit

Permalink
core/token: fix panic looking up invalid batch tokens (#11415) (#11416)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf authored Apr 20, 2021
1 parent b0e91d2 commit a10df31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vault/token_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,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 a10df31

Please sign in to comment.