From 5111187c2e894c17f3b248f27a63b8f8c58c443a Mon Sep 17 00:00:00 2001 From: Michel Le Bihan Date: Tue, 9 Oct 2018 18:42:19 +0200 Subject: MUC: Check that a room password is set before verifying password supplied by user --- plugins/muc/password.lib.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/muc') diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua index 36a2ec6f..1f4b2add 100644 --- a/plugins/muc/password.lib.lua +++ b/plugins/muc/password.lib.lua @@ -42,6 +42,7 @@ end); -- Don't allow anyone to join room unless they provide the password module:hook("muc-occupant-pre-join", function(event) local room, stanza = event.room, event.stanza; + if not get_password(room) then return end local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc"); if not muc_x then return end local password = muc_x:get_child_text("password", "http://jabber.org/protocol/muc"); -- cgit v1.2.3