Software /
code /
prosody
Changeset
1186:078eb3b109e9
mod_saslauth: Fix logic error which prevented SASL ANONYMOUS from working
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 18 May 2009 04:48:35 +0100 |
parents | 1143:5bab3eb566ad |
children | 1187:645846375a7b 1190:fff8158faae2 |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed May 13 16:54:46 2009 +0100 +++ b/plugins/mod_saslauth.lua Mon May 18 04:48:35 2009 +0100 @@ -79,8 +79,10 @@ local function sasl_handler(session, stanza) if stanza.name == "auth" then -- FIXME ignoring duplicates because ejabberd does - if config.get(session.host or "*", "core", "anonymous_login") and stanza.attr.mechanism ~= "ANONYMOUS" then - return session.send(build_reply("failure", "invalid-mechanism")); + if config.get(session.host or "*", "core", "anonymous_login") then + if stanza.attr.mechanism ~= "ANONYMOUS" then + return session.send(build_reply("failure", "invalid-mechanism")); + end elseif stanza.attr.mechanism == "ANONYMOUS" then return session.send(build_reply("failure", "mechanism-too-weak")); end