Software /
code /
prosody
Changeset
4392:d2a7a44d68c5
mod_saslauth: Never send empty <mechanisms/>.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 13 Oct 2011 00:10:02 +0500 |
parents | 4391:71083327f608 |
children | 4393:7958680c459a |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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