mirror of
https://github.com/openwrt/luci.git
synced 2026-02-04 12:06:01 +08:00
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 <jjm2473@gmail.com>
This commit is contained in:
committed by
Paul Donald
parent
b258d7a248
commit
5ad9c3609e
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user