Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix: Fix room locking without visitors.

damencho43be4324af64
diff --git a/resources/prosody-plugins/mod_visitors.lua b/resources/prosody-plugins/mod_visitors.lua
index 78e2f72ed3..ed2046c47c 100644
--- a/resources/prosody-plugins/mod_visitors.lua
+++ b/resources/prosody-plugins/mod_visitors.lua
@@ -310,10 +310,13 @@ process_host_module(main_muc_component_config, function(host_module, host)
host_module:hook('muc-config-submitted/muc#roomconfig_roomsecret', function(event)
if event.status_codes['104'] then
local room = event.room;
- -- we need to update all vnodes
- local vnodes = visitors_nodes[room.jid].nodes;
- for conference_service in pairs(vnodes) do
- send_visitors_iq(conference_service, room, 'update');
+
+ if visitors_nodes[room.jid] then
+ -- we need to update all vnodes
+ local vnodes = visitors_nodes[room.jid].nodes;
+ for conference_service in pairs(vnodes) do
+ send_visitors_iq(conference_service, room, 'update');
+ end
end
end
end, -100); -- we want to run last in order to check is the status code 104
diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.lua
index 42c86b1b79..38128f6723 100644
--- a/resources/prosody-plugins/mod_visitors_component.lua
+++ b/resources/prosody-plugins/mod_visitors_component.lua
@@ -189,7 +189,8 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
-- visitors were already in the room one way or another they have access
-- skip password challenge
local join = stanza:get_child('x', MUC_NS);
- if join and room:get_password() then
+ if join and room:get_password() and
+ visitors_promotion_map[room.jid] and visitors_promotion_map[room.jid][jid.node(stanza.attr.from)] then
join:tag('password', { xmlns = MUC_NS }):text(room:get_password());
end
@@ -200,7 +201,7 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
if visitors_promotion_map[room.jid] then
-- now let's check for jid
- if visitors_promotion_map[room.jid] and visitors_promotion_map[room.jid][jid.node(stanza.attr.from)] then
+ if visitors_promotion_map[room.jid][jid.node(stanza.attr.from)] then
-- allow join
return;
end