aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-05 10:10:53 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-05 10:10:53 +0100
commit0737347176e4c0bedce11ea9e2632fd562691120 (patch)
tree35b027fa9560975ea16429f1f2bcbdfa0b2308b7
parent1b1fabf68e354b473ae5e6016dec7dc5ca7d6e12 (diff)
downloadprosody-0737347176e4c0bedce11ea9e2632fd562691120.tar.gz
prosody-0737347176e4c0bedce11ea9e2632fd562691120.zip
mod_tls: Only advertise TLS if the server told us which host they are connecting to
-rw-r--r--plugins/mod_tls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index 93193726..7fb9bb81 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -58,7 +58,7 @@ module:add_event_hook("s2s-stream-features",
function (session, features)
-- This hook is possibly called once per host (at least if the
-- remote server does not specify a to/from.
- if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then
+ if session.to_host and session.conn.starttls and not features:child_with_ns(xmlns_starttls) then
features:tag("starttls", starttls_attr):up();
-- TODO: Make this optional :P
--features:tag("required"):up():up();