diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-03-22 15:16:43 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-03-22 15:16:43 +0000 |
commit | 4adcfb2d185bb95ec430822c772f091b713faa7a (patch) | |
tree | 405a0afb10ef1d47dfd38bb35f78b22d3f98864b /plugins | |
parent | 4f7c31c0f98b9b4fd6ff12e8770dbdd5bff8cea2 (diff) | |
parent | 68a7de369b8d2b5701ef6403ce6d3f8d4e7e8fa9 (diff) | |
download | prosody-4adcfb2d185bb95ec430822c772f091b713faa7a.tar.gz prosody-4adcfb2d185bb95ec430822c772f091b713faa7a.zip |
Merge 0.9->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 512c9037..ec969cc3 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -423,7 +423,6 @@ local listener = {}; --- Session methods local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'}; -local default_stream_attr = { ["xmlns:stream"] = "http://etherx.jabber.org/streams", xmlns = stream_callbacks.default_ns, version = "1.0", id = "" }; local function session_close(session, reason, remote_reason) local log = session.log or log; if session.conn then @@ -611,14 +610,15 @@ end function check_auth_policy(event) local host, session = event.host, event.session; - - if not secure_auth and secure_domains[host] then - secure_auth = true; - elseif secure_auth and insecure_domains[host] then - secure_auth = false; + local must_secure = secure_auth; + + if not must_secure and secure_domains[host] then + must_secure = true; + elseif must_secure and insecure_domains[host] then + must_secure = false; end - if secure_auth and not session.cert_identity_status then + if must_secure and not session.cert_identity_status then module:log("warn", "Forbidding insecure connection to/from %s", host); session:close(false); return false; |