# HG changeset patch # User Waqas Hussain # Date 1266123639 -18000 # Node ID d2805ad5b7366fa7ec3c9b0ddf4b5a59a218a2cb # Parent e79057cf2538548bdb13aaa6454fe96727b2d6b0 mod_tls: Ban TLS after auth, not before. diff -r e79057cf2538 -r d2805ad5b736 plugins/mod_tls.lua --- a/plugins/mod_tls.lua Sun Feb 14 09:59:57 2010 +0500 +++ b/plugins/mod_tls.lua Sun Feb 14 10:00:39 2010 +0500 @@ -26,9 +26,9 @@ local function can_do_tls(session) if session.type == "c2s_unauthed" then - return session.username and session.conn.starttls and host.ssl_ctx_in; + return session.conn.starttls and host.ssl_ctx_in; elseif session.type == "s2sin_unauthed" then - return session.to_host and session.conn.starttls and host.ssl_ctx_in; + return session.conn.starttls and host.ssl_ctx_in; end return false; end