diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-09-29 19:56:23 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-09-29 19:56:23 +0100 |
commit | ba09a2a2b6a57e733261d98bff261f6f7718084b (patch) | |
tree | 7fb4e0c0ca40c8c58fce7296899de37b6f9e8bb7 | |
parent | e22d1deb6b31bdf6795dbb5c0b810bed3c9a3663 (diff) | |
parent | d937a3e04370ddb4a3bbb172e152b89ce8036cfd (diff) | |
download | prosody-ba09a2a2b6a57e733261d98bff261f6f7718084b.tar.gz prosody-ba09a2a2b6a57e733261d98bff261f6f7718084b.zip |
Merge with 0.5
-rw-r--r-- | plugins/mod_saslauth.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 6051bf9d..cbaaaa38 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -56,14 +56,15 @@ local function handle_status(session, status) if status == "failure" then session.sasl_handler = nil; elseif status == "success" then - if not session.sasl_handler.username then -- TODO move this to sessionmanager + local username = nodeprep(session.sasl_handler.username); + session.sasl_handler = nil; + if not username then -- TODO move this to sessionmanager module:log("warn", "SASL succeeded but we didn't get a username!"); session.sasl_handler = nil; session:reset_stream(); return; - end - sm_make_authenticated(session, session.sasl_handler.username); - session.sasl_handler = nil; + end + sm_make_authenticated(session, username); session:reset_stream(); end end |