Changeset

5706:c69320fc438b

mod_client_management: Bail out retrieving tokens for user Fixes core/usermanager.lua:118: attempt to index a nil value (field '?')
author Kim Alvefur <zash@zash.se>
date Sun, 29 Oct 2023 12:41:56 +0100
parents 5705:527c747711f3
children 5707:7c264a2cb970
files mod_client_management/mod_client_management.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_client_management/mod_client_management.lua	Sun Oct 29 11:30:49 2023 +0100
+++ b/mod_client_management/mod_client_management.lua	Sun Oct 29 12:41:56 2023 +0100
@@ -185,6 +185,9 @@
 end
 
 local function is_client_active(client)
+	if not client.full_jid then
+		return nil;
+	end
 	local username, host = jid.split(client.full_jid);
 	local account_info = usermanager.get_account_info(username, host);
 	local last_password_change = account_info and account_info.password_updated;