Diff

plugins/mod_tokenauth.lua @ 13356:bbbda8819331

mod_tokenauth: Ignore invalid grants in storage that have no id
author Matthew Wild <mwild1@gmail.com>
date Wed, 29 Nov 2023 17:51:34 +0000
parent 13321:19c814d4dd3a
child 13638:94462d8f2fa9
line wrap: on
line diff
--- a/plugins/mod_tokenauth.lua	Wed Nov 29 17:50:33 2023 +0000
+++ b/plugins/mod_tokenauth.lua	Wed Nov 29 17:51:34 2023 +0000
@@ -145,7 +145,7 @@
 	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);