diff options
author | Kim Alvefur <zash@zash.se> | 2023-10-09 20:26:30 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-10-09 20:26:30 +0200 |
commit | 4df58bc22f231c504b55ae5e4d8f1942734a14f7 (patch) | |
tree | 463d4aa7468eb8ad9b8052673aaa233dd27cef38 /plugins | |
parent | 33657b4001c5ac339157a749524076a7cdc6fade (diff) | |
download | prosody-4df58bc22f231c504b55ae5e4d8f1942734a14f7.tar.gz prosody-4df58bc22f231c504b55ae5e4d8f1942734a14f7.zip |
mod_tokenauth: Delete grants in the wrong formats on retrieval
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tokenauth.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua index cf34b48c..6c94e34f 100644 --- a/plugins/mod_tokenauth.lua +++ b/plugins/mod_tokenauth.lua @@ -159,6 +159,11 @@ local function _get_validated_grant_info(username, grant) 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 |