mod_tls: Ban TLS after auth, not before.
authorWaqas Hussain <waqas20@gmail.com>
Sun, 14 Feb 2010 05:00:39 +0000 (10:00 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Sun, 14 Feb 2010 05:00:39 +0000 (10:00 +0500)
plugins/mod_tls.lua

index 67d8d5d771984bd1df4dd485b124f6fb3c7e4258..1a00c36e06736a2f877355f7e7e119c352741c05 100644 (file)
@@ -26,9 +26,9 @@ local host = hosts[module.host];
 
 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