Comparison

plugins/mod_saslauth.lua @ 10340:5c6912289ce3

mod_saslauth: Demote "no SASL mechanisms" error back to warning This gets printed before TLS if c2s_require_encryption = false, in which case it is just annoying.
author Kim Alvefur <zash@zash.se>
date Tue, 15 Oct 2019 23:38:29 +0200
parent 10339:8b06d2d51e04
child 10481:7a3c04789d5c
comparison
equal deleted inserted replaced
10339:8b06d2d51e04 10340:5c6912289ce3
293 return; 293 return;
294 end 294 end
295 295
296 local authmod = module:get_option_string("authentication", "internal_plain"); 296 local authmod = module:get_option_string("authentication", "internal_plain");
297 if available_mechanisms:empty() then 297 if available_mechanisms:empty() then
298 log("error", "No available SASL mechanisms, verify that the configured authentication module '%s' is loaded and configured correctly", authmod); 298 log("warn", "No available SASL mechanisms, verify that the configured authentication module '%s' is loaded and configured correctly", authmod);
299 return; 299 return;
300 end 300 end
301 301
302 if not origin.secure and not available_insecure:empty() then 302 if not origin.secure and not available_insecure:empty() then
303 if not available_disabled:empty() then 303 if not available_disabled:empty() then
304 log("error", "All SASL mechanisms provided by authentication module '%s' are forbidden on insecure connections (%s) or disabled (%s)", 304 log("warn", "All SASL mechanisms provided by authentication module '%s' are forbidden on insecure connections (%s) or disabled (%s)",
305 authmod, available_insecure, available_disabled); 305 authmod, available_insecure, available_disabled);
306 else 306 else
307 log("error", "All SASL mechanisms provided by authentication module '%s' are forbidden on insecure connections (%s)", 307 log("warn", "All SASL mechanisms provided by authentication module '%s' are forbidden on insecure connections (%s)",
308 authmod, available_insecure); 308 authmod, available_insecure);
309 end 309 end
310 elseif not available_disabled:empty() then 310 elseif not available_disabled:empty() then
311 log("error", "All SASL mechanisms provided by authentication module '%s' are disabled (%s)", 311 log("warn", "All SASL mechanisms provided by authentication module '%s' are disabled (%s)",
312 authmod, available_disabled); 312 authmod, available_disabled);
313 end 313 end
314 314
315 else 315 else
316 features:tag("bind", bind_attr):tag("required"):up():up(); 316 features:tag("bind", bind_attr):tag("required"):up():up();