# HG changeset patch # User Kim Alvefur # Date 1652649374 -7200 # Node ID 604bb5b8362d338130e8c8eb5933508025342501 # Parent 88e1b94105aeb970a0c64dc15492d02437c2458f mod_admin_shell: Tighten up type checks to fix #1754 (thanks clouded) Due to the dummy statistics provider (see core.statsmanager line 250) having a metatable that allows infinite indexing where everything is always the same table, which end up in suf() in the concatenation line. diff -r 88e1b94105ae -r 604bb5b8362d plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Mon May 09 22:39:05 2022 +0200 +++ b/plugins/mod_admin_shell.lua Sun May 15 23:16:14 2022 +0200 @@ -49,12 +49,12 @@ end local function pre(prefix, str, alt) - if (str or "") == "" then return alt or ""; end + if type(str) ~= "string" or str == "" then return alt or ""; end return prefix .. str; end local function suf(str, suffix, alt) - if (str or "") == "" then return alt or ""; end + if type(str) ~= "string" or str == "" then return alt or ""; end return str .. suffix; end