aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 19b7f047..f4f7ad36 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -24,6 +24,7 @@ local wrapclient = require "net.server".wrapclient;
local modulemanager = require "core.modulemanager";
local st = require "stanza";
local stanza = st.stanza;
+local nameprep = require "util.encodings".stringprep.nameprep;
local uuid_gen = require "util.uuid".generate;
@@ -211,8 +212,8 @@ function streamopened(session, attr)
if session.direction == "incoming" then
-- Send a reply stream header
- session.to_host = attr.to;
- session.from_host = attr.from;
+ session.to_host = attr.to and nameprep(attr.to);
+ session.from_host = attr.from and nameprep(attr.from);
session.streamid = uuid_gen();
(session.log or log)("debug", "incoming s2s received <stream:stream>");