Sun, 04 Jul 2010 19:16:20 +0100
xmppcomponent_listener: Add log messages for when stanzas from components have invalid or missing to/from addresses
net/xmppcomponent_listener.lua | file | annotate | diff | comparison | revisions |
--- a/net/xmppcomponent_listener.lua Sun Jul 04 19:15:20 2010 +0100 +++ b/net/xmppcomponent_listener.lua Sun Jul 04 19:16:20 2010 +0100 @@ -107,6 +107,7 @@ local _, domain = jid_split(stanza.attr.from); if domain ~= session.host then -- Return error + session.log("warn", "Component sent stanza with missing or invalid 'from' address"); session:close{ condition = "invalid-from"; text = "Component tried to send from address <"..tostring(from) @@ -119,6 +120,7 @@ stanza.attr.from = session.host; end if not stanza.attr.to then + session.log("warn", "Rejecting stanza with no 'to' address"); session.send(st.error_reply(stanza, "modify", "bad-request", "Components MUST specify a 'to' address on stanzas")); return; end