aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichel Le Bihan <michel@lebihan.pl>2018-10-09 18:42:19 +0200
committerMichel Le Bihan <michel@lebihan.pl>2018-10-09 18:42:19 +0200
commit09b659294a5762c559e38b00c062765657585471 (patch)
treecd97b4a25d6da9af67fa45757e9a9ca054c12eba /plugins
parente7d4ae6aacbdf7cf6a5daa9e48e3d260f906875a (diff)
downloadprosody-09b659294a5762c559e38b00c062765657585471.tar.gz
prosody-09b659294a5762c559e38b00c062765657585471.zip
MUC: Check that a room password is set before verifying password supplied by user
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/password.lib.lua1
1 files changed, 1 insertions, 0 deletions
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");