From 98d0d23d70abdc80c47c058bec2f20c0f274dde7 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 1 Sep 2015 08:21:47 -0400 Subject: [PATCH] Ensure token store is available when looking up token --- vault/core.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vault/core.go b/vault/core.go index ca9fe8e84..35dd4e283 100644 --- a/vault/core.go +++ b/vault/core.go @@ -614,6 +614,11 @@ func (c *Core) checkToken( return nil, nil, fmt.Errorf("missing client token") } + if c.tokenStore == nil { + c.logger.Printf("[ERR] core: token store is unavailable") + return nil, nil, ErrInternalError + } + // Resolve the token policy te, err := c.tokenStore.Lookup(token) if err != nil {