Fixed: Some nil access bugs

This commit is contained in:
Waqas Hussain 2009-03-30 05:26:10 +05:00
parent 1de71a88b9
commit 2365831f7d
2 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ local function sasl_handler(session, stanza)
-- 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"));
elseif mechanism == "ANONYMOUS" then
elseif stanza.attr.mechanism == "ANONYMOUS" then
return session.send(build_reply("failure", "mechanism-too-weak"));
end
session.sasl_handler = new_sasl(stanza.attr.mechanism, session.host, password_callback);