aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-14 16:03:48 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-14 16:03:48 +0000
commit94692c20efb3c0edc09710f509c0c310e5c9d0c1 (patch)
tree99c8459a6f0659c000405eb10b1ec63b253fc22f /core/stanza_router.lua
parent9dd38d32f927e10b0a1d9346cc0e000009d8256a (diff)
downloadprosody-94692c20efb3c0edc09710f509c0c310e5c9d0c1.tar.gz
prosody-94692c20efb3c0edc09710f509c0c310e5c9d0c1.zip
Don't reject some valid IQs. Thanks to elmex for spotting.
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 23b7a37d..f4d1ffac 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