Dashboard: protect against rogue graph entries

This commit is contained in:
bergware
2023-12-15 10:35:40 +01:00
parent 6b6dfab52b
commit c95a6b37de

View File

@@ -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
}