Software /
code /
prosody
Changeset
13517:4bf889e94831
mod_admin_shell: Prevent traceback due to type error
Here too
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 26 Aug 2024 22:26:59 +0200 |
parents | 13516:078780f262d5 |
children | 13520:662dfff658a0 |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Mon Aug 26 19:21:03 2024 +0200 +++ b/plugins/mod_admin_shell.lua Mon Aug 26 22:26:59 2024 +0200 @@ -978,7 +978,7 @@ 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 @@ -- 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; };