Software /
code /
prosody
Changeset
6489:1f07c72112d2
mod_saslauth: Log warning if no SASL mechanisms were offered
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Oct 2014 12:57:56 +0200 |
parents | 6488:c91193b7e72c |
children | 6490:8ad74f48b2aa |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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();