mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Do not run validate.php as root (#12327)
This commit is contained in:
parent
0ede8a2c1d
commit
aded238299
@ -53,6 +53,11 @@ if (isset($options['h'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (function_exists('posix_getuid') && posix_getuid() === 0) {
|
||||
echo 'Do not run validate.php as root' . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Check autoload
|
||||
if (! file_exists('vendor/autoload.php')) {
|
||||
print_fail('Composer has not been run, dependencies are missing', './scripts/composer_wrapper.php install --no-dev');
|
||||
|
Loading…
Reference in New Issue
Block a user