Changeset

4043:a533abe6ffd0

mod_vcard_muc: Fix #1414 issue with nil room being queried when a stanza with a nonexisting MUC localpart was sent
author Michel Le Bihan <michel@lebihan.pl>
date Mon, 08 Jun 2020 18:39:16 +0200
parents 4039:2af0301af734
children 4044:f4999d75d305
files mod_vcard_muc/mod_vcard_muc.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_vcard_muc/mod_vcard_muc.lua	Sun Jun 07 00:19:49 2020 +0200
+++ b/mod_vcard_muc/mod_vcard_muc.lua	Mon Jun 08 18:39:16 2020 +0200
@@ -60,6 +60,10 @@
 	local room_jid = stanza.attr.to;
 	local room_node = jid_split(room_jid);
 	local room = get_room_from_jid(room_jid);
+	if not room then
+		session.send(st.error_reply(stanza, "cancel", "item-not-found"))
+		return true;
+	end
 
 	local from = stanza.attr.from;
 	local from_affiliation = room:get_affiliation(from);