diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-18 04:48:35 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-18 04:48:35 +0100 |
commit | 4c6d6e419fa7afba0ac190a34d70c2dad018b4f7 (patch) | |
tree | f10d641d2031c9bbda6803cacf65579300b688d6 /plugins | |
parent | 482dc64bc93ed1ea413f0ae63ebe6e854783e338 (diff) | |
download | prosody-4c6d6e419fa7afba0ac190a34d70c2dad018b4f7.tar.gz prosody-4c6d6e419fa7afba0ac190a34d70c2dad018b4f7.zip |
mod_saslauth: Fix logic error which prevented SASL ANONYMOUS from working
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index f27d8060..3f570e40 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -79,8 +79,10 @@ end 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 |