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 | 00cb511e2eda7190b29bf58cddb12b5b5e1b402a (patch) | |
tree | fb33c7212c4a47343a110212ec2497c83f9e5276 /plugins/mod_saslauth.lua | |
parent | 82f50a212252a2683463a981e7b73abc8301627d (diff) | |
download | prosody-00cb511e2eda7190b29bf58cddb12b5b5e1b402a.tar.gz prosody-00cb511e2eda7190b29bf58cddb12b5b5e1b402a.zip |
mod_saslauth: Log warning if no SASL mechanisms were offered
Diffstat (limited to 'plugins/mod_saslauth.lua')
-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(); |