Software /
code /
prosody
Changeset
13271:56c1d2498d66
mod_tokenauth: Delete grants in the wrong formats on retrieval
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 09 Oct 2023 20:26:30 +0200 |
parents | 13270:14bbfb2cc8dd |
children | 13272:8535a6105919 |
files | plugins/mod_tokenauth.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua Sun Oct 15 16:43:14 2023 +0200 +++ b/plugins/mod_tokenauth.lua Mon Oct 09 20:26:30 2023 +0200 @@ -159,6 +159,11 @@ return nil, "expired"; end + if not grant.tokens then + module:log("debug", "Token grant without tokens, cleaning up"); + token_store:set_key(username, grant.id, nil); + return nil, "invalid"; + end return grant; end