# HG changeset patch # User Matthew Wild # Date 1242734833 -3600 # Node ID 645846375a7b5eb23e0afb3fb87760e0be86a85e # Parent c68ccb7faeaf4e2745577012cc0df3d43bc2450b# Parent 078eb3b109e9664c3e5c78b3cdea37a000dbdd21 Merge with 0.4 diff -r c68ccb7faeaf -r 645846375a7b plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Tue May 19 11:56:52 2009 +0100 +++ b/plugins/mod_saslauth.lua Tue May 19 13:07:13 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