plugins/mod_saslauth.lua
changeset 6492 1f07c72112d2
parent 6491 c91193b7e72c
child 6493 8ad74f48b2aa
--- 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();