From d1bf57ecd876c8ef83575247a631d24df6be466a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 7 Aug 2023 23:29:50 +0200 Subject: [PATCH] luci-base: dispatcher.uc: fix error500() reporting in fallback case Fix the `error500()` fallback code path to properly output the given error message in case rendering the error template failed. Signed-off-by: Jo-Philipp Wich (cherry picked from commit a435d4e11a1f0701200ad392000dbaf0d0135405) --- modules/luci-base/ucode/dispatcher.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 39af8375ea..831922ac1d 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -52,7 +52,7 @@ function error500(msg, ex) { } catch { http.write('\n'); - http.write(`

${trim(ex)}

\n`); + http.write(`

${trim(msg)}

\n`); if (ex) { http.write(`

${trim(ex.message)}

\n`); -- 2.30.2