# HG changeset patch # User Matthew Wild # Date 1237046628 0 # Node ID b61c3589cd7bdf840a62b7b14082a9ff3380ef66 # Parent 96de7f0a41cc65db24fd90e909292038377e1078 Don't reject some valid IQs. Thanks to elmex for spotting. diff -r 96de7f0a41cc -r b61c3589cd7b core/stanza_router.lua --- a/core/stanza_router.lua Sat Mar 07 19:57:28 2009 +0000 +++ b/core/stanza_router.lua Sat Mar 14 16:03:48 2009 +0000 @@ -51,11 +51,9 @@ 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