# HG changeset patch # User Waqas Hussain # Date 1318446602 -18000 # Node ID d2a7a44d68c591637d6a6434c0c4d70db7f76dd9 # Parent 71083327f60840357dffcf63cbe147728c28c4d7 mod_saslauth: Never send empty . diff -r 71083327f608 -r d2a7a44d68c5 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Wed Oct 12 03:48:48 2011 +0100 +++ b/plugins/mod_saslauth.lua Thu Oct 13 00:10:02 2011 +0500 @@ -248,8 +248,10 @@ return; end origin.sasl_handler = usermanager_get_sasl_handler(module.host); + local mechanisms = origin.sasl_handler:mechanisms(); + if not next(mechanisms) then return; end features:tag("mechanisms", mechanisms_attr); - for mechanism in pairs(origin.sasl_handler:mechanisms()) do + for mechanism in pairs(mechanisms) do if mechanism ~= "PLAIN" or origin.secure or allow_unencrypted_plain_auth then features:tag("mechanism"):text(mechanism):up(); end