plugins/mod_tokenauth.lua
changeset 13003 c87ac7d1967f
parent 13002 601d9a375b86
child 13004 c7253174503e
--- a/plugins/mod_tokenauth.lua	Mon Mar 27 18:35:57 2023 +0100
+++ b/plugins/mod_tokenauth.lua	Mon Mar 27 20:51:07 2023 +0100
@@ -123,7 +123,8 @@
 	local updated;
 	now = now or os.time();
 	for secret, token_info in pairs(grant.tokens) do
-		if token_info.expires < now then
+		local expires = token_info.expires;
+		if expires and expires < now then
 			grant.tokens[secret] = nil;
 			updated = true;
 		end