diff options
author | Kim Alvefur <zash@zash.se> | 2014-10-21 12:57:56 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-10-21 12:57:56 +0200 |
commit | 371d996a7d0b32e617611b40faa9f2d8988dbd53 (patch) | |
tree | fb33c7212c4a47343a110212ec2497c83f9e5276 /plugins | |
parent | bf13e6d88e94227b690654fa385fc342613908df (diff) | |
download | prosody-371d996a7d0b32e617611b40faa9f2d8988dbd53.tar.gz prosody-371d996a7d0b32e617611b40faa9f2d8988dbd53.zip |
mod_saslauth: Log warning if no SASL mechanisms were offered
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index af3a5fec..1820dce3 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -235,7 +235,11 @@ module:hook("stream-features", function(event) 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(); |