diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-03-30 03:03:06 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-03-30 03:03:06 +0500 |
commit | 3f5c2d00542fdee9a7c6d9abedd3d32209878625 (patch) | |
tree | 0c694929d54afef3228f0954d99a8a9e1ba7f937 /core | |
parent | d0380394a90b1cbf3b6c517ebd2ed2067ac02b74 (diff) | |
download | prosody-3f5c2d00542fdee9a7c6d9abedd3d32209878625.tar.gz prosody-3f5c2d00542fdee9a7c6d9abedd3d32209878625.zip |
Fixed: sessionmanager: Apply nameprep on hostname passed in stream tag (part of issue #57)
Diffstat (limited to 'core')
-rw-r--r-- | core/sessionmanager.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 762982c1..efc99366 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -23,6 +23,7 @@ local error = error; local uuid_generate = require "util.uuid".generate; local rm_load_roster = require "core.rostermanager".load_roster; local config_get = require "core.configmanager".get; +local nameprep = require "util.encodings".stringprep.nameprep; local fire_event = require "core.eventmanager".fire_event; @@ -156,6 +157,7 @@ end function streamopened(session, attr) local send = session.send; session.host = attr.to or error("Client failed to specify destination hostname"); + session.host = nameprep(session.host); session.version = tonumber(attr.version) or 0; session.streamid = m_random(1000000, 99999999); (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); |