# HG changeset patch # User Kim Alvefur # Date 1364195929 -3600 # Node ID 1130887e0d41fa6e2da6383dae2344241493971e # Parent 43059357b2f0a1aed4cc0c23dd9b06331fcd1a50 mod_s2s: session.from_host does not allways exist on incoming connections, true and nil or "our hostname" does not evaluate to what we want here diff -r 43059357b2f0 -r 1130887e0d41 plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Sat Mar 23 23:30:13 2013 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Mon Mar 25 08:18:49 2013 +0100 @@ -211,7 +211,7 @@ --- Helper to check that a session peer's certificate is valid local function check_cert_status(session) - local host = session.direction == "incoming" and session.from_host or session.to_host + local host = session.direction == "outgoing" and session.to_host or session.from_host local conn = session.conn:socket() local cert if conn.getpeercertificate then