aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_legacyauth.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-04-20 18:19:28 +0100
committerMatthew Wild <mwild1@gmail.com>2011-04-20 18:19:28 +0100
commit49fb45a07bff1f2364743eaae6860c5b3370ebec (patch)
treea4b36268e535ad444a62030d3e0a4a29755df9a0 /plugins/mod_legacyauth.lua
parentae8349a1e4f5706fb57c1781459d62e85024b046 (diff)
downloadprosody-49fb45a07bff1f2364743eaae6860c5b3370ebec.tar.gz
prosody-49fb45a07bff1f2364743eaae6860c5b3370ebec.zip
mod_legacyauth: Disallow on unencrypted connections by default, heed allow_unencrypted_plain_auth config option (thanks Maranda/Zash)
Diffstat (limited to 'plugins/mod_legacyauth.lua')
-rw-r--r--plugins/mod_legacyauth.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_legacyauth.lua b/plugins/mod_legacyauth.lua
index 47a8c0ab..a47f0223 100644
--- a/plugins/mod_legacyauth.lua
+++ b/plugins/mod_legacyauth.lua
@@ -11,7 +11,9 @@
local st = require "util.stanza";
local t_concat = table.concat;
-local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption");
+local secure_auth_only = module:get_option("c2s_require_encryption")
+ or module:get_option("require_encryption")
+ or not(module:get_option("allow_unencrypted_plain_auth"));
local sessionmanager = require "core.sessionmanager";
local usermanager = require "core.usermanager";