# HG changeset patch # User Kim Alvefur # Date 1381142580 -7200 # Node ID e327f2d4e09fa65547333ec73e8785d911ac38b0 # Parent 8613888d0f9e9f681a7ef27e4e60391e726e53a5 mod_c2s, mod_s2s: Set session.encrypted as session.secure does not allways mean encrypted (eg consider_bosh_secure) diff -r 8613888d0f9e -r e327f2d4e09f plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_c2s.lua Mon Oct 07 12:43:00 2013 +0200 @@ -69,6 +69,7 @@ -- since we now have a new stream header, session is secured if session.secure == false then session.secure = true; + session.encrypted = true; local sock = session.conn:socket(); if sock.info then @@ -209,6 +210,7 @@ -- Client is using legacy SSL (otherwise mod_tls sets this flag) if conn:ssl() then session.secure = true; + session.encrypted = true; -- Check if TLS compression is used local sock = conn:socket(); diff -r 8613888d0f9e -r e327f2d4e09f plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Mon Oct 07 12:43:00 2013 +0200 @@ -283,6 +283,7 @@ -- TODO: Rename session.secure to session.encrypted if session.secure == false then session.secure = true; + session.encrypted = true; local sock = session.conn:socket(); if sock.info then diff -r 8613888d0f9e -r e327f2d4e09f plugins/mod_s2s/s2sout.lib.lua --- a/plugins/mod_s2s/s2sout.lib.lua Sun Oct 06 23:18:54 2013 +0200 +++ b/plugins/mod_s2s/s2sout.lib.lua Mon Oct 07 12:43:00 2013 +0200 @@ -270,6 +270,7 @@ -- Reset secure flag in case this is another -- connection attempt after a failed STARTTLS host_session.secure = nil; + host_session.encrypted = nil; local conn, handler; local proto = connect_host.proto;