# HG changeset patch # User Tobias Markmann # Date 1258645418 -3600 # Node ID 7ef74b2be8f8f54943e39d3e7b64b4c536596d2f # Parent 5f54100bb4260b9fd4b2bd66d4dfd98bc6c8d676 Allow SASL PLAIN over unsecure connections when intended by admin. diff -r 5f54100bb426 -r 7ef74b2be8f8 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Thu Nov 19 15:29:09 2009 +0100 +++ b/plugins/mod_saslauth.lua Thu Nov 19 16:43:38 2009 +0100 @@ -141,7 +141,7 @@ session.sasl_handler = new_sasl(session.host, anonymous_authentication_profile); else session.sasl_handler = new_sasl(session.host, default_authentication_profile); - if not session.secure then + if not (module:get_option("allow_unencrypted_plain_auth")) and not session.secure then session.sasl_handler:forbidden({"PLAIN"}); end end