diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-06-12 02:39:18 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-06-12 02:39:18 +0100 |
commit | 06982adcd24eabee31abcebc167411430697d55a (patch) | |
tree | 986567d378b68a194e49c780a06ac427f82054bc /core | |
parent | fdb9749df9dbd15aab3607a5b09c2f6652877e6e (diff) | |
parent | bc718af42e21112f168a114eb9840b54976f6179 (diff) | |
download | prosody-06982adcd24eabee31abcebc167411430697d55a.tar.gz prosody-06982adcd24eabee31abcebc167411430697d55a.zip |
Merge 0.7->trunk
Diffstat (limited to 'core')
-rw-r--r-- | core/sessionmanager.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index ac07a793..63768515 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -25,6 +25,7 @@ local rm_load_roster = require "core.rostermanager".load_roster; local config_get = require "core.configmanager".get; local nameprep = require "util.encodings".stringprep.nameprep; local resourceprep = require "util.encodings".stringprep.resourceprep; +local nodeprep = require "util.encodings".stringprep.nodeprep; local initialize_filters = require "util.filters".initialize; local fire_event = require "core.eventmanager".fire_event; @@ -122,6 +123,8 @@ function destroy_session(session, err) end function make_authenticated(session, username) + username = nodeprep(username); + if not username or #username == 0 then return nil, "Invalid username"; end session.username = username; if session.type == "c2s_unauthed" then session.type = "c2s"; |