Software /
code /
prosody
Changeset
931:4514ed5ee943
Fixed: s2smanager: Apply nameprep on hostnames passed in stream tag (part of issue #57)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 30 Mar 2009 03:06:01 +0500 |
parents | 930:fed53329818d |
children | 932:1ed3e5fe165a |
files | core/s2smanager.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/s2smanager.lua Mon Mar 30 03:03:06 2009 +0500 +++ b/core/s2smanager.lua Mon Mar 30 03:06:01 2009 +0500 @@ -24,6 +24,7 @@ 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 @@ if session.direction == "incoming" then -- Send a reply stream header - session.to_host = attr.to; - session.from_host = attr.from; + session.to_host = nameprep(attr.to); + session.from_host = nameprep(attr.from); session.streamid = uuid_gen(); (session.log or log)("debug", "incoming s2s received <stream:stream>");