# HG changeset patch # User Michel Le Bihan # Date 1539103339 -7200 # Node ID c62c983b8be3c6a26f51dab9904c825fcc944eb4 # Parent 6780049be177918327477cb27029df51a600b8ed MUC: Check that a room password is set before verifying password supplied by user diff -r 6780049be177 -r c62c983b8be3 plugins/muc/password.lib.lua --- a/plugins/muc/password.lib.lua Tue Oct 09 15:02:44 2018 +0100 +++ b/plugins/muc/password.lib.lua Tue Oct 09 18:42:19 2018 +0200 @@ -42,6 +42,7 @@ -- 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");