aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-20 20:17:05 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-20 20:17:05 +0000
commitd469ca0cc105a5ff6cb870cbc732f8c33e81a12c (patch)
tree4b3184d739830c46ae66e5d3aa7495c1a1941063 /core/stanza_router.lua
parentc80f91dc0233276fcf112c54c6b7753dd68af354 (diff)
parentbcd9d386bf3d145872796dd6bb183a34bf64b2f8 (diff)
downloadprosody-d469ca0cc105a5ff6cb870cbc732f8c33e81a12c.tar.gz
prosody-d469ca0cc105a5ff6cb870cbc732f8c33e81a12c.zip
Merge
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 3a2d237b..f98d0ce2 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -51,11 +51,9 @@ function core_process_stanza(origin, stanza)
if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling.
-- TODO verify validity of stanza (as well as JID validity)
- if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then
+ if stanza.name == "iq" and #stanza.tags > 1 then
if stanza.attr.type == "set" or stanza.attr.type == "get" then
error("Invalid IQ");
- elseif #stanza.tags > 1 and not(stanza.attr.type == "error" or stanza.attr.type == "result") then
- error("Invalid IQ");
end
end