aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-12-21 22:00:49 +0000
committerMatthew Wild <mwild1@gmail.com>2009-12-21 22:00:49 +0000
commit070043c6d2253715db574ced09feb9887d9a7654 (patch)
treef02480c05064f3c2ee741bf5294760204b5547f7 /plugins/mod_saslauth.lua
parentf6f447b4215f34bc46e57159058b20b53efe5de0 (diff)
downloadprosody-070043c6d2253715db574ced09feb9887d9a7654.tar.gz
prosody-070043c6d2253715db574ced09feb9887d9a7654.zip
mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 001f14e2..dd13930e 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -104,6 +104,9 @@ local function sasl_handler(session, stanza)
if not valid_mechanism then
return session.send(build_reply("failure", "invalid-mechanism"));
end
+ if secure_auth_only and not session.secure then
+ return session.send(build_reply("failure", "encryption-required"));
+ end
elseif not session.sasl_handler then
return; -- FIXME ignoring out of order stanzas because ejabberd does
end