Skip to content

Commit bdb3dc4

Browse files
committed
Very important security patch
Users can no longer run arbitrary code on the system by creating a file called ';<arbitrary command>' in the zip file
1 parent d3664bb commit bdb3dc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inspections/SyntaxErrorInspection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public function run(){
3131
$good = 0;
3232
$bad = 0;
3333
foreach(new \RegexIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->dir)), "#\\.php\$#") as $file){
34-
exec("php -l $file 2>&1", $out);
34+
$ef = escapeshellarg($file);
35+
exec("php -l $ef 2>&1", $out);
3536
$lint = implode("<br>", $out);
3637
if(strpos($lint, "No syntax errors detected in") === 0){
3738
$good++;

0 commit comments

Comments
 (0)