Changeset

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
parents 1692:44ddec97ad82
children 1694:25412e94fb3e
files mod_watchuntrusted/mod_watchuntrusted.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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;