Software /
code /
prosody
Comparison
core/stanza_router.lua @ 10362:c05444119e9e
Backed out changeset 64ddcbc9a328 as it would prevent communicating with valid remote JIDs that aren't valid under STRINGPREP / Unicode 3.2
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 30 Oct 2019 17:33:52 +0100 |
parent | 10360:64ddcbc9a328 |
child | 10528:48300484a124 |
comparison
equal
deleted
inserted
replaced
10361:6e051bfca12d | 10362:c05444119e9e |
---|---|
81 local to_bare, from_bare; | 81 local to_bare, from_bare; |
82 if to then | 82 if to then |
83 if full_sessions[to] or bare_sessions[to] or hosts[to] then | 83 if full_sessions[to] or bare_sessions[to] or hosts[to] then |
84 node, host = jid_split(to); -- TODO only the host is needed, optimize | 84 node, host = jid_split(to); -- TODO only the host is needed, optimize |
85 else | 85 else |
86 node, host, resource = jid_prepped_split(to, origin.type == "c2s"); | 86 node, host, resource = jid_prepped_split(to); |
87 if not host then | 87 if not host then |
88 log("warn", "Received stanza with invalid destination JID: %s", to); | 88 log("warn", "Received stanza with invalid destination JID: %s", to); |
89 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then | 89 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |
90 origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The destination address is invalid: "..to)); | 90 origin.send(st.error_reply(stanza, "modify", "jid-malformed", "The destination address is invalid: "..to)); |
91 end | 91 end |