diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-02 17:14:54 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-02 17:14:54 +0500 |
commit | 727cc275bba229332912af42fe0e55524d73efdb (patch) | |
tree | 1698593f49c403ff2d25ee9c6bc7a78be9de44c2 /plugins | |
parent | 498421b3bac3f259cc2a7b65cea6f7601a974d88 (diff) | |
parent | 271afa36733db02b9cace7261a16b8243505bf33 (diff) | |
download | prosody-727cc275bba229332912af42fe0e55524d73efdb.tar.gz prosody-727cc275bba229332912af42fe0e55524d73efdb.zip |
Merge
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 32269221..f196e483 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -52,14 +52,14 @@ 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; + sm_make_authenticated(session, username); session:reset_stream(); end end |