Software /
code /
prosody
Diff
core/stanza_router.lua @ 1152:4d95e8078405
stanza_router: Fixed an invalid stanza check
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 15 May 2009 07:04:41 +0500 |
parent | 1149:72fc323050c1 |
child | 1156:14f3eb0e7787 |
line wrap: on
line diff
--- a/core/stanza_router.lua Fri May 15 06:39:53 2009 +0500 +++ b/core/stanza_router.lua Fri May 15 07:04:41 2009 +0500 @@ -54,7 +54,7 @@ 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.attr.xmlns == "error" and #stanza.tags == 0 then return; end -- TODO invalid stanza, log + if stanza.attr.type == "error" and #stanza.tags == 0 then return; end -- TODO invalid stanza, log if stanza.name == "iq" then if (stanza.attr.type == "set" or stanza.attr.type == "get") and #stanza.tags ~= 1 then origin.send(st.error_reply(stanza, "modify", "bad-request"));