backend: fix regression in 796a5c725b, when using %d or %f as formatters, we can't push them through escapeshellarg() as it will mangle the data unneeded. closes https://github.com/opnsense/core/issues/9686

This commit is contained in:
Ad Schellevis 2026-01-31 09:21:04 +01:00
parent 311184daa8
commit ca06d54676

View file

@ -49,9 +49,8 @@ class Shell
}
foreach ($args as $id => $arg) {
$args[$id] = escapeshellarg($arg ?? '');
$args[$id] = is_int($arg) || is_float($arg) ? $arg : escapeshellarg($arg ?? '');
}
return vsprintf(implode(' ', $format), $args);
}