aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-11 21:30:24 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-11 21:30:24 +0500
commitbc718af42e21112f168a114eb9840b54976f6179 (patch)
treed4f80be73f0a562583a42e5fe17366d878f64aaf
parentbb5877bcfa52a29d70f6521b8d77596dfdfa9819 (diff)
downloadprosody-bc718af42e21112f168a114eb9840b54976f6179.tar.gz
prosody-bc718af42e21112f168a114eb9840b54976f6179.zip
sessionmanager: Fixed a traceback on invalid usernames (typo in previous commit).vault/0.7.00.7.0
-rw-r--r--core/sessionmanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index db32a0bc..e1f1a802 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -111,7 +111,7 @@ end
function make_authenticated(session, username)
username = nodeprep(username);
- if not username and #username > 0 then return nil, "Invalid username"; end
+ if not username or #username == 0 then return nil, "Invalid username"; end
session.username = username;
if session.type == "c2s_unauthed" then
session.type = "c2s";