Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 5387:1130887e0d41
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 25 Mar 2013 08:18:49 +0100 |
parent | 5368:ab31dbb3a415 |
child | 5389:d147a4227a72 |
line wrap: on
line diff
--- 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