aboutsummaryrefslogtreecommitdiffstats
path: root/net/xmppcomponent_listener.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/xmppcomponent_listener.lua')
-rw-r--r--net/xmppcomponent_listener.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua
index de1dca45..5532186b 100644
--- a/net/xmppcomponent_listener.lua
+++ b/net/xmppcomponent_listener.lua
@@ -107,6 +107,7 @@ function stream_callbacks.handlestanza(session, stanza)
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 @@ function stream_callbacks.handlestanza(session, stanza)
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