diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-12 00:33:04 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-12 00:33:04 +0100 |
commit | 2cf49c8f3765ef4e1cfc4824d9f7e25238b2172f (patch) | |
tree | 30cd4e1f7530333116c1e5376eaac22235c079e3 /core/stanza_router.lua | |
parent | 56403793d7458cb2e374be3b63eb2640d587b9b9 (diff) | |
download | prosody-2cf49c8f3765ef4e1cfc4824d9f7e25238b2172f.tar.gz prosody-2cf49c8f3765ef4e1cfc4824d9f7e25238b2172f.zip |
stanza_router: Remove FIXME comment and close stream with not-authorized for s2s stanzas from unauthed domains
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r-- | core/stanza_router.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index cea38166..4c241c27 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -109,7 +109,8 @@ function core_process_stanza(origin, stanza) local host_status = origin.hosts[from_host]; if not host_status or not host_status.authed then -- remote server trying to impersonate some other server? log("warn", "Received a stanza claiming to be from %s, over a stream authed for %s!", from_host, origin.from_host); - return; -- FIXME what should we do here? does this work with subdomains? + origin:close("not-authorized"); + return; elseif not hosts[to_host] then log("warn", "Remote server %s sent us a stanza for %s, closing stream", origin.from_host, to_host); origin:close("host-unknown"); |