Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 4939:0545a574667b
mod_saslauth: Pass session to usermanager.get_sasl_handler()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 04 Jul 2012 23:44:13 +0100 |
parent | 4754:449a78f91f0e |
child | 5351:901ed253bbf7 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed Jul 04 23:43:18 2012 +0100 +++ b/plugins/mod_saslauth.lua Wed Jul 04 23:44:13 2012 +0100 @@ -208,7 +208,7 @@ session.sasl_handler = nil; -- allow starting a new SASL negotiation before completing an old one end if not session.sasl_handler then - session.sasl_handler = usermanager_get_sasl_handler(module.host); + session.sasl_handler = usermanager_get_sasl_handler(module.host, session); end local mechanism = stanza.attr.mechanism; if not session.secure and (secure_auth_only or (mechanism == "PLAIN" and not allow_unencrypted_plain_auth)) then @@ -246,7 +246,7 @@ if secure_auth_only and not origin.secure then return; end - origin.sasl_handler = usermanager_get_sasl_handler(module.host); + origin.sasl_handler = usermanager_get_sasl_handler(module.host, origin); local mechanisms = st.stanza("mechanisms", mechanisms_attr); for mechanism in pairs(origin.sasl_handler:mechanisms()) do if mechanism ~= "PLAIN" or origin.secure or allow_unencrypted_plain_auth then