Protect against empty expires field in Expire.

This commit is contained in:
Juliusz Chroboczek
2024-05-02 18:40:53 +02:00
parent 9e7231ee6e
commit 53481fde5e
+1 -1
View File
@@ -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
}