aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-11-29 17:51:34 +0000
committerMatthew Wild <mwild1@gmail.com>2023-11-29 17:51:34 +0000
commitad3ab533edfee569a4b9948db48e0089de5e1162 (patch)
treed1c7357b1c19764b94d3d33c1903bf28f765e1d0
parent34b4ec02fee1ab3d732a8ddc8e0155685a6340bb (diff)
downloadprosody-ad3ab533edfee569a4b9948db48e0089de5e1162.tar.gz
prosody-ad3ab533edfee569a4b9948db48e0089de5e1162.zip
mod_tokenauth: Ignore invalid grants in storage that have no id
-rw-r--r--plugins/mod_tokenauth.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_tokenauth.lua b/plugins/mod_tokenauth.lua
index cb2b63c2..95b0f8d6 100644
--- a/plugins/mod_tokenauth.lua
+++ b/plugins/mod_tokenauth.lua
@@ -145,7 +145,7 @@ local function _get_validated_grant_info(username, grant)
if type(grant) == "string" then
grant = token_store:get_key(username, grant);
end
- if not grant or not grant.created then return nil; end
+ if not grant or not grant.created or not grant.id then return nil; end
-- Invalidate grants from before last password change
local account_info = usermanager.get_account_info(username, module.host);