mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Execute commands using the numeric conventions of the C locale. (#5192)
This commit is contained in:
committed by
Neil Lathwood
parent
5c156e7e01
commit
4e436f8a8b
@@ -206,7 +206,7 @@ function check_service($command)
|
||||
$valid_uom = array ('us', 'ms', 'KB', 'MB', 'GB', 'TB', 'c', 's', '%', 'B');
|
||||
|
||||
// Make our command safe.
|
||||
$command = escapeshellcmd($command);
|
||||
$command = 'LC_NUMERIC="C" '. escapeshellcmd($command);
|
||||
|
||||
// Run the command and return its response.
|
||||
exec($command, $response_array, $status);
|
||||
|
Reference in New Issue
Block a user