# HG changeset patch # User Waqas Hussain # Date 1238364361 -18000 # Node ID 4514ed5ee943e3f7d63b7a53526dd8ec8a5b5c42 # Parent fed53329818d89eee98eff96f1ed7ec1460ce078 Fixed: s2smanager: Apply nameprep on hostnames passed in stream tag (part of issue #57) diff -r fed53329818d -r 4514ed5ee943 core/s2smanager.lua --- 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 ");