diff options
-rw-r--r-- | plugins/mod_c2s.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 4d7318a5..682c4e3b 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -39,13 +39,12 @@ local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/strea function stream_callbacks.streamopened(session, attr) local send = session.send; - session.host = attr.to; + session.host = nameprep(attr.to); if not session.host then session:close{ condition = "improper-addressing", - text = "A 'to' attribute is required on stream headers" }; + text = "A valid 'to' attribute is required on stream headers" }; return; end - session.host = nameprep(session.host); session.version = tonumber(attr.version) or 0; session.streamid = uuid_generate(); (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); |