From 25efbdf62b14c73c6c13e68fb313bd0998fb2b45 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 5 Oct 2009 10:10:53 +0100 Subject: [PATCH] mod_tls: Only advertise TLS if the server told us which host they are connecting to --- plugins/mod_tls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.30.2