From 53481fde5e4f945cbeebb107b429484e968fa3cb Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 2 May 2024 18:40:53 +0200 Subject: [PATCH] Protect against empty expires field in Expire. --- token/stateful.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token/stateful.go b/token/stateful.go index 1cf0efe..102e535 100644 --- a/token/stateful.go +++ b/token/stateful.go @@ -410,7 +410,7 @@ func (state *state) Expire() error { modified := false for k, t := range state.tokens { - if t.Expires.Before(cutoff) { + if t.Expires != nil && t.Expires.Before(cutoff) { delete(state.tokens, k) modified = true }