aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-08-26 22:26:59 +0200
committerKim Alvefur <zash@zash.se>2024-08-26 22:26:59 +0200
commitad41d2b5d83422e7ad036d64d7edbcd2c6fbee20 (patch)
tree4951bea826a7fdb71b9eed904b9c4d6700a5d299
parent8362c4824ed6469ca89c187a1df654d10777d270 (diff)
downloadprosody-ad41d2b5d83422e7ad036d64d7edbcd2c6fbee20.tar.gz
prosody-ad41d2b5d83422e7ad036d64d7edbcd2c6fbee20.zip
mod_admin_shell: Prevent traceback due to type error
Here too
-rw-r--r--plugins/mod_admin_shell.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index d085ce43..e6b44f00 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -978,7 +978,7 @@ available_columns = {
return capitalize(cert_status);
end
-- no certificate status,
- if session.cert_chain_errors then
+ if type(session.cert_chain_errors) == "table" then
local cert_errors = set.new(session.cert_chain_errors[1]);
if cert_errors:contains("certificate has expired") then
return "Expired";
@@ -989,6 +989,7 @@ available_columns = {
-- TODO borrow more logic from mod_s2s/friendly_cert_error()
return "Untrusted";
end
+ -- TODO cert_chain_errors can be a string, handle that
return "Unknown";
end;
};