Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 1860:5ef1eea887ca
Merge
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 17:14:54 +0500 |
parent | 1846:fdb43fc1bafc |
child | 1847:1842da566c7d |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Fri Oct 02 17:07:18 2009 +0500 +++ b/plugins/mod_saslauth.lua Fri Oct 02 17:14:54 2009 +0500 @@ -52,14 +52,14 @@ 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