mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 16:50:09 +01:00
Escape file paths
Use escapeshellarg to make file paths safe to use in shell command
This commit is contained in:
@@ -148,6 +148,10 @@
|
||||
$app->command('logs', function () {
|
||||
$files = Site::logs(Configuration::read()['paths']);
|
||||
|
||||
$files = collect($files)->transform(function ($file) {
|
||||
return escapeshellarg($file);
|
||||
})->all();
|
||||
|
||||
if (count($files) > 0) {
|
||||
passthru('tail -f '.implode(' ', $files));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user