Software /
code /
prosody
Comparison
core/stanza_router.lua @ 213:181f5cc6215b
Commented a buggy check
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 04 Nov 2008 17:43:48 +0500 |
parent | 212:9d6da9ed9063 |
child | 215:ec90acc13ba3 |
comparison
equal
deleted
inserted
replaced
212:9d6da9ed9063 | 213:181f5cc6215b |
---|---|
59 local from_node, from_host, from_resource = jid_split(from); | 59 local from_node, from_host, from_resource = jid_split(from); |
60 local from_bare = from_node and (from_node.."@"..from_host) or from_host; -- bare JID | 60 local from_bare = from_node and (from_node.."@"..from_host) or from_host; -- bare JID |
61 | 61 |
62 if origin.type == "s2sin" then | 62 if origin.type == "s2sin" then |
63 if origin.host ~= from_host then -- remote server trying to impersonate some other server? | 63 if origin.host ~= from_host then -- remote server trying to impersonate some other server? |
64 log("warn", "origin.host ~= from_host"); | |
64 return; -- FIXME what should we do here? does this work with subdomains? | 65 return; -- FIXME what should we do here? does this work with subdomains? |
65 end | 66 end |
66 end | 67 end |
67 if to and not(hosts[to]) and not(hosts[to_bare]) and (not(hosts[host]) or hosts[host].type ~= "local") then -- not for us? | 68 --[[if to and not(hosts[to]) and not(hosts[to_bare]) and (hosts[host] and hosts[host].type ~= "local") then -- not for us? |
69 log("warn", "stanza recieved for a non-local server"); | |
68 return; -- FIXME what should we do here? | 70 return; -- FIXME what should we do here? |
69 end | 71 end]] -- FIXME |
70 | 72 |
71 -- FIXME do stanzas not of jabber:client get handled by components? | 73 -- FIXME do stanzas not of jabber:client get handled by components? |
72 if not to then | 74 if not to then |
73 core_handle_stanza(origin, stanza); | 75 core_handle_stanza(origin, stanza); |
74 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server | 76 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server |