plugins/mod_saslauth.lua

changeset 2204
2dc746323de6
parent 2203
7ef74b2be8f8
child 2242
ee6ac55a72d6
equal deleted inserted replaced
2203:7ef74b2be8f8 2204:2dc746323de6
135 function (session, features) 135 function (session, features)
136 if not session.username then 136 if not session.username then
137 if secure_auth_only and not session.secure then 137 if secure_auth_only and not session.secure then
138 return; 138 return;
139 end 139 end
140 if config.get(session.host or "*", "core", "anonymous_login") then 140 if module:get_option("anonymous_login") then
141 session.sasl_handler = new_sasl(session.host, anonymous_authentication_profile); 141 session.sasl_handler = new_sasl(session.host, anonymous_authentication_profile);
142 else 142 else
143 session.sasl_handler = new_sasl(session.host, default_authentication_profile); 143 session.sasl_handler = new_sasl(session.host, default_authentication_profile);
144 if not (module:get_option("allow_unencrypted_plain_auth")) and not session.secure then 144 if not (module:get_option("allow_unencrypted_plain_auth")) and not session.secure then
145 session.sasl_handler:forbidden({"PLAIN"}); 145 session.sasl_handler:forbidden({"PLAIN"});

mercurial