From c95a6b37de23540ba2cf812220302092ddfd3a1d Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 15 Dec 2023 10:35:40 +0100 Subject: [PATCH] Dashboard: protect against rogue graph entries --- emhttp/plugins/dynamix/nchan/update_1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix/nchan/update_1 b/emhttp/plugins/dynamix/nchan/update_1 index 63f3ee99f..063648c1d 100755 --- a/emhttp/plugins/dynamix/nchan/update_1 +++ b/emhttp/plugins/dynamix/nchan/update_1 @@ -64,7 +64,7 @@ while (true) { $hooks = array_filter(glob("/usr/local/emhttp/plugins/*/system/*",GLOB_NOSORT),function($file){return is_executable($file);}); foreach ($hooks as $hook) { $data = @intval(exec(escapeshellarg($hook))); - if (!$data) continue; + if (!$data || $data>$used) continue; $names[] = _(basename($hook)); // name of element (with translation) $bytes[] = $data; // value in bytes of element }