core/stanza_router.lua

changeset 73
937448005121
parent 72
e78db62beebc
child 78
972e31cc91e8
equal deleted inserted replaced
72:e78db62beebc 73:937448005121
13 require "util.jid" 13 require "util.jid"
14 local jid_split = jid.split; 14 local jid_split = jid.split;
15 15
16 function core_process_stanza(origin, stanza) 16 function core_process_stanza(origin, stanza)
17 log("debug", "Received: "..tostring(stanza)) 17 log("debug", "Received: "..tostring(stanza))
18 -- TODO verify validity of stanza 18 -- TODO verify validity of stanza (as well as JID validity)
19 19
20 local to = stanza.attr.to; 20 local to = stanza.attr.to;
21 stanza.attr.from = origin.full_jid -- quick fix to prevent impersonation 21 stanza.attr.from = origin.full_jid -- quick fix to prevent impersonation
22 22
23 if not to or (hosts[to] and hosts[to].type == "local") then 23 if not to or (hosts[to] and hosts[to].type == "local") then

mercurial