# HG changeset patch # User Matthew Wild # Date 1341441853 -3600 # Node ID 0545a574667b3de4cdd83917ff58fa4aee7e68d3 # Parent 76a960bff4c78732f87bc5c67b690a42d51541cb mod_saslauth: Pass session to usermanager.get_sasl_handler() diff -r 76a960bff4c7 -r 0545a574667b plugins/mod_saslauth.lua --- 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