Do not run validate.php as root (#12327)

This commit is contained in:
Tony Murray 2020-11-19 15:41:32 -06:00 committed by GitHub
parent 0ede8a2c1d
commit aded238299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');