From: Liangbin Lian Date: Thu, 8 Jan 2026 18:25:11 +0000 (+0800) Subject: luci-base: rpc: fix luci/getMountPoints crash X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=5ad9c3609e1616836d6bc6125a6c983231a2de9c;p=openwrt-luci.git luci-base: rpc: fix luci/getMountPoints crash getMountPoints crash on path containing '\xxx'. `char` should be `chr` Fixes https://github.com/openwrt/openwrt/issues/21459 Signed-off-by: Liangbin Lian --- diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci index 55a55726bf..c779619745 100644 --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci @@ -541,8 +541,8 @@ const methods = { for (let line = fd.read('line'); length(line); line = fd.read('line')) { const m = split(line, ' '); - const device = replace(m[0], /\\([0-9][0-9][0-9])/g, (m, n) => char(int(n, 8))); - const mount = replace(m[1], /\\([0-9][0-9][0-9])/g, (m, n) => char(int(n, 8))); + const device = replace(m[0], /\\([0-9][0-9][0-9])/g, (m, n) => chr(int(n, 8))); + const mount = replace(m[1], /\\([0-9][0-9][0-9])/g, (m, n) => chr(int(n, 8))); const stat = statvfs(mount); if (stat?.blocks > 0) {