Allow SASL PLAIN over unsecure connections when intended by admin.

Thu, 19 Nov 2009 16:43:38 +0100

author
Tobias Markmann <tm@ayena.de>
date
Thu, 19 Nov 2009 16:43:38 +0100
changeset 2203
7ef74b2be8f8
parent 2202
5f54100bb426
child 2204
2dc746323de6

Allow SASL PLAIN over unsecure connections when intended by admin.

plugins/mod_saslauth.lua file | annotate | diff | comparison | revisions
--- 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

mercurial