Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 938:663f75dd7b42
Fixed: Some nil access bugs
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 30 Mar 2009 05:26:10 +0500 |
parent | 935:efe3eaaeff34 |
child | 1042:a3d77353c18a |
comparison
equal
deleted
inserted
replaced
937:40ccaacb2000 | 938:663f75dd7b42 |
---|---|
72 local function sasl_handler(session, stanza) | 72 local function sasl_handler(session, stanza) |
73 if stanza.name == "auth" then | 73 if stanza.name == "auth" then |
74 -- FIXME ignoring duplicates because ejabberd does | 74 -- FIXME ignoring duplicates because ejabberd does |
75 if config.get(session.host or "*", "core", "anonymous_login") and stanza.attr.mechanism ~= "ANONYMOUS" then | 75 if config.get(session.host or "*", "core", "anonymous_login") and stanza.attr.mechanism ~= "ANONYMOUS" then |
76 return session.send(build_reply("failure", "invalid-mechanism")); | 76 return session.send(build_reply("failure", "invalid-mechanism")); |
77 elseif mechanism == "ANONYMOUS" then | 77 elseif stanza.attr.mechanism == "ANONYMOUS" then |
78 return session.send(build_reply("failure", "mechanism-too-weak")); | 78 return session.send(build_reply("failure", "mechanism-too-weak")); |
79 end | 79 end |
80 session.sasl_handler = new_sasl(stanza.attr.mechanism, session.host, password_callback); | 80 session.sasl_handler = new_sasl(stanza.attr.mechanism, session.host, password_callback); |
81 if not session.sasl_handler then | 81 if not session.sasl_handler then |
82 return session.send(build_reply("failure", "invalid-mechanism")); | 82 return session.send(build_reply("failure", "invalid-mechanism")); |