Changeset

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
parents 13355:a6c8a50cdfb5
children 13357:f424c9f1460b
files plugins/mod_tokenauth.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);