Software /
code /
prosody
Changeset
12999:c87ac7d1967f
mod_tokenauth: Fix traceback when checking expiry of tokens with no expiry
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 27 Mar 2023 20:51:07 +0100 |
parents | 12998:601d9a375b86 |
children | 13000:c7253174503e |
files | plugins/mod_tokenauth.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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