Software /
code /
prosody
Changeset
1152:4d95e8078405
stanza_router: Fixed an invalid stanza check
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 15 May 2009 07:04:41 +0500 |
parents | 1151:8096941b6734 |
children | 1153:1184cb19b6f2 |
files | core/stanza_router.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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"));