Protect against empty expires field in Expire.
This commit is contained in:
+1
-1
@@ -410,7 +410,7 @@ func (state *state) Expire() error {
|
|||||||
|
|
||||||
modified := false
|
modified := false
|
||||||
for k, t := range state.tokens {
|
for k, t := range state.tokens {
|
||||||
if t.Expires.Before(cutoff) {
|
if t.Expires != nil && t.Expires.Before(cutoff) {
|
||||||
delete(state.tokens, k)
|
delete(state.tokens, k)
|
||||||
modified = true
|
modified = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user