# HG changeset patch # User Kim Alvefur # Date 1413889076 -7200 # Node ID 1f07c72112d2011b3ceac23d8a0a196c2bc62f18 # Parent c91193b7e72cd6cda8775e67eddec1dcee0f250f mod_saslauth: Log warning if no SASL mechanisms were offered diff -r c91193b7e72c -r 1f07c72112d2 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Tue Oct 21 12:56:19 2014 +0200 +++ b/plugins/mod_saslauth.lua Tue Oct 21 12:57:56 2014 +0200 @@ -235,7 +235,11 @@ mechanisms:tag("mechanism"):text(mechanism):up(); end end - if mechanisms[1] then features:add_child(mechanisms); end + if mechanisms[1] then + features:add_child(mechanisms); + else + (origin.log or log)("warn", "No SASL mechanisms to offer"); + end else features:tag("bind", bind_attr):tag("required"):up():up(); features:tag("session", xmpp_session_attr):tag("optional"):up():up();