Software /
code /
prosody-modules
Diff
mod_watchuntrusted/mod_watchuntrusted.lua @ 1693:2328cbc41045
mod_watchuntrusted: Skip connections to/from unknown hosts (fixes possible traceback)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 May 2015 12:09:08 +0200 |
parent | 1675:116488cced16 |
child | 1877:055b39c08fd0 |
line wrap: on
line diff
--- a/mod_watchuntrusted/mod_watchuntrusted.lua Tue May 05 01:37:21 2015 +0200 +++ b/mod_watchuntrusted/mod_watchuntrusted.lua Tue May 05 12:09:08 2015 +0200 @@ -13,6 +13,7 @@ module:hook_global("s2s-check-certificate", function (event) local session, host = event.session, event.host; + if not host then return end local conn = session.conn:socket(); local local_host = session.direction == "outgoing" and session.from_host or session.to_host;