aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-12-08 21:06:41 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-12-08 21:06:41 +0500
commit17f4b2de32a2b8d83d9b4dabef5abe88ad368692 (patch)
tree05f8fec3d511e447493bcc9c868ead6318d4c5df /core/modulemanager.lua
parentb7eba6a2cda0d98e052a29f7e4b4735dc094aaef (diff)
downloadprosody-17f4b2de32a2b8d83d9b4dabef5abe88ad368692.tar.gz
prosody-17f4b2de32a2b8d83d9b4dabef5abe88ad368692.zip
Don't try processing stanzas not of type get or set in module manager
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 3c27e7a0..84486b58 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -123,8 +123,13 @@ end
function handle_stanza(host, origin, stanza)
local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns, origin.type;
if name == "iq" and xmlns == "jabber:client" then
- xmlns = stanza.tags[1].attr.xmlns;
- log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns);
+ if stanza.attr.type == "get" or stanza.attr.type == "set" then
+ xmlns = stanza.tags[1].attr.xmlns;
+ log("debug", "Stanza of type %s from %s has xmlns: %s", name, origin_type, xmlns);
+ else
+ log("debug", "Discarding %s from %s of type: %s", name, origin_type, stanza.attr.type);
+ return true;
+ end
end
local handlers = stanza_handlers:get(host, origin_type, name, xmlns);
if handlers then