From c51152432a24b2030d19b002734df9046b7a076c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Oct 2022 16:19:39 +0200 Subject: mod_admin_shell: Ensure connection exists to get port from (fixes #1777) --- plugins/mod_admin_shell.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index f8fa7242..bd84658d 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -745,7 +745,11 @@ available_columns = { width = 5; align = "right"; key = "conn"; - mapper = function(conn) return conn:serverport(); end; + mapper = function(conn) + if conn then + return conn:serverport(); + end + end; }; dir = { title = "Dir"; -- cgit v1.2.3 From 20532df52592717027b1cb138da71abc8913ffbf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 23 Oct 2022 16:22:12 +0200 Subject: mod_admin_shell: Ensure available connection for column 'secure' Similar to #1777 --- plugins/mod_admin_shell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index bd84658d..dda35f08 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -816,7 +816,7 @@ available_columns = { width = 30; key = "conn"; mapper = function(conn) - local sock = conn:socket(); + local sock = conn and conn:socket(); local info = sock and sock.info and sock:info(); if info then return info.cipher end end; -- cgit v1.2.3