aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-01 01:36:11 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-01 01:36:11 +0500
commitc33e8699c02ea861669e607e6fe1725db4822f1f (patch)
tree1ece790f4b603730c8544d3ab10f4344392af939
parent161a78b35bd69f748b52989945613809541e26a3 (diff)
downloadprosody-c33e8699c02ea861669e607e6fe1725db4822f1f.tar.gz
prosody-c33e8699c02ea861669e607e6fe1725db4822f1f.zip
MUC: Return <item-not-found/> on message and iq to non-existent rooms (thanks Maranda).
-rw-r--r--plugins/muc/mod_muc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 0fa172ee..7312157c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -135,6 +135,10 @@ function stanza_handler(event)
local bare = jid_bare(stanza.attr.to);
local room = rooms[bare];
if not room then
+ if stanza.name ~= "presence" then
+ origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
+ return true;
+ end
if not(restrict_room_creation) or
(restrict_room_creation == "admin" and is_admin(stanza.attr.from)) or
(restrict_room_creation == "local" and select(2, jid_split(stanza.attr.from)) == module.host:gsub("^[^%.]+%.", "")) then