mod_admin_shell: Handle absence of connection in security column (thanks arcseconds)
authorKim Alvefur <zash@zash.se>
Mon, 15 Nov 2021 13:31:06 +0100
changeset 11909 bbfa707a4756
parent 11908 313d01cc4258
child 11910 ba3344926e18
mod_admin_shell: Handle absence of connection in security column (thanks arcseconds) I surmise this can happen in a disconnected/smacks hibernation state.
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Sat Nov 13 22:12:39 2021 +0100
+++ b/plugins/mod_admin_shell.lua	Mon Nov 15 13:31:06 2021 +0100
@@ -710,7 +710,7 @@
 		width = 11;
 		mapper = function(conn, session)
 			if not session.secure then return "insecure"; end
-			if not conn:ssl() then return "secure" end
+			if not conn or not conn:ssl() then return "secure" end
 			local sock = conn and conn:socket();
 			if not sock then return "unknown TLS"; end
 			local tls_info = sock.info and sock:info();