Skip to content

Commit a10df31

Browse files
authored
core/token: fix panic looking up invalid batch tokens (#11415) (#11416)
1 parent b0e91d2 commit a10df31

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
@@ -1156,6 +1156,9 @@ func (ts *TokenStore) lookupBatchToken(ctx context.Context, id string) (*logical
11561156
if err != nil {
11571157
return nil, err
11581158
}
1159+
if te == nil {
1160+
return nil, nil
1161+
}
11591162

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

0 commit comments

Comments
 (0)