Skip to content

Commit 9171422

Browse files
authored
core/token: fix panic looking up invalid batch tokens (#11415) (#11417)
1 parent 6977c11 commit 9171422

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vault/token_store.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,9 @@ func (ts *TokenStore) lookupBatchToken(ctx context.Context, id string) (*logical
11621162
if err != nil {
11631163
return nil, err
11641164
}
1165+
if te == nil {
1166+
return nil, nil
1167+
}
11651168

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

0 commit comments

Comments
 (0)