mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 22:57:38 +03:00
mod_saslauth: Fix logic error which prevented SASL ANONYMOUS from working
This commit is contained in:
parent
482dc64bc9
commit
4c6d6e419f
1 changed files with 4 additions and 2 deletions
|
@ -79,8 +79,10 @@ end
|
||||||
local function sasl_handler(session, stanza)
|
local function sasl_handler(session, stanza)
|
||||||
if stanza.name == "auth" then
|
if stanza.name == "auth" then
|
||||||
-- FIXME ignoring duplicates because ejabberd does
|
-- FIXME ignoring duplicates because ejabberd does
|
||||||
if config.get(session.host or "*", "core", "anonymous_login") and stanza.attr.mechanism ~= "ANONYMOUS" then
|
if config.get(session.host or "*", "core", "anonymous_login") then
|
||||||
return session.send(build_reply("failure", "invalid-mechanism"));
|
if stanza.attr.mechanism ~= "ANONYMOUS" then
|
||||||
|
return session.send(build_reply("failure", "invalid-mechanism"));
|
||||||
|
end
|
||||||
elseif stanza.attr.mechanism == "ANONYMOUS" then
|
elseif stanza.attr.mechanism == "ANONYMOUS" then
|
||||||
return session.send(build_reply("failure", "mechanism-too-weak"));
|
return session.send(build_reply("failure", "mechanism-too-weak"));
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue