diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-05-18 12:02:25 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-05-18 12:02:25 +0100 |
commit | 3c13765aa1610bae5aa6b5ef8b2c6b0d3f6f2628 (patch) | |
tree | 083cfea92cecdd125a5fa4f0fb4f8db60639fd7f /plugins/mod_s2s | |
parent | 5ec46c6c37b7145c71d4d1b9aa0bb2ab431a54d6 (diff) | |
download | prosody-3c13765aa1610bae5aa6b5ef8b2c6b0d3f6f2628.tar.gz prosody-3c13765aa1610bae5aa6b5ef8b2c6b0d3f6f2628.zip |
mod_s2s: Fix interaction between s2s_secure_auth and s2s_require_encryption, in particular ensure that when s2s_require_encryption is NOT set, do not require encryption on s2s_insecure_domains.
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 30ebb706..5a2af968 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -37,7 +37,7 @@ local opt_keepalives = module:get_option_boolean("s2s_tcp_keepalives", module:ge local secure_auth = module:get_option_boolean("s2s_secure_auth", false); -- One day... local secure_domains, insecure_domains = module:get_option_set("s2s_secure_domains", {})._items, module:get_option_set("s2s_insecure_domains", {})._items; -local require_encryption = module:get_option_boolean("s2s_require_encryption", secure_auth); +local require_encryption = module:get_option_boolean("s2s_require_encryption", false); local sessions = module:shared("sessions"); @@ -185,7 +185,7 @@ end function make_authenticated(event) local session, host = event.session, event.host; if not session.secure then - if require_encryption or secure_auth or secure_domains[host] then + if require_encryption or (secure_auth and not(insecure_domains[host])) or secure_domains[host] then session:close({ condition = "policy-violation", text = "Encrypted server-to-server communication is required but was not " |