Skip to content

Commit

Permalink
Add .phar to blocked PHP extensions (#39666)
Browse files Browse the repository at this point in the history
By default Debian includes support for executing .phar files alongside
.php and .phtml files, and should be included in the blocked list.
  • Loading branch information
valorin authored Nov 18, 2021
1 parent 5168f85 commit ccea1bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}

$phpExtensions = [
'php', 'php3', 'php4', 'php5', 'phtml',
'php', 'php3', 'php4', 'php5', 'phtml', 'phar',
];

return ($value instanceof UploadedFile)
Expand Down

0 comments on commit ccea1bf

Please sign in to comment.