From a10df31ee51d18d8dc4a3eda8b6ffd9097b21ba5 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Mon, 19 Apr 2021 18:43:25 -0700 Subject: [PATCH] core/token: fix panic looking up invalid batch tokens (#11415) (#11416) --- vault/token_store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vault/token_store.go b/vault/token_store.go index 95afa3c91718..27a0e32dc3be 100644 --- a/vault/token_store.go +++ b/vault/token_store.go @@ -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