Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 2388:4768879d3591
mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 21 Dec 2009 22:00:49 +0000 |
parent | 2251:18079ede5b62 |
child | 2390:4f8f9dfa22ac |
comparison
equal
deleted
inserted
replaced
2387:92264ee3a0e4 | 2388:4768879d3591 |
---|---|
102 end | 102 end |
103 local valid_mechanism = session.sasl_handler:select(stanza.attr.mechanism); | 103 local valid_mechanism = session.sasl_handler:select(stanza.attr.mechanism); |
104 if not valid_mechanism then | 104 if not valid_mechanism then |
105 return session.send(build_reply("failure", "invalid-mechanism")); | 105 return session.send(build_reply("failure", "invalid-mechanism")); |
106 end | 106 end |
107 if secure_auth_only and not session.secure then | |
108 return session.send(build_reply("failure", "encryption-required")); | |
109 end | |
107 elseif not session.sasl_handler then | 110 elseif not session.sasl_handler then |
108 return; -- FIXME ignoring out of order stanzas because ejabberd does | 111 return; -- FIXME ignoring out of order stanzas because ejabberd does |
109 end | 112 end |
110 local text = stanza[1]; | 113 local text = stanza[1]; |
111 if text then | 114 if text then |