aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-05-19 13:07:13 +0100
committerMatthew Wild <mwild1@gmail.com>2009-05-19 13:07:13 +0100
commit8cca61ebde8108135a8b38a5896880ca2a4e5a40 (patch)
treed34a839895ec8b22821abdcb39a209b4ebb3a786
parentc1a8b0ae9fcab23214636d14d1b139148c025429 (diff)
parent4c6d6e419fa7afba0ac190a34d70c2dad018b4f7 (diff)
downloadprosody-8cca61ebde8108135a8b38a5896880ca2a4e5a40.tar.gz
prosody-8cca61ebde8108135a8b38a5896880ca2a4e5a40.zip
Merge with 0.4
-rw-r--r--plugins/mod_saslauth.lua6
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