Skip to content

Commit

Permalink
Add to list of PHP file extensions (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Nov 15, 2023
1 parent d7d9d9e commit 7f4a645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/GuestEntryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ protected function uploadFile(string $key, Field $field, Request $request)

$uploadedFiles = collect($uploadedFiles)
->each(function ($file) use ($key) {
if (in_array(trim(strtolower($file->getClientOriginalExtension())), ['php', 'php3', 'php4', 'php5', 'phtml'])) {
if (in_array(trim(strtolower($file->getClientOriginalExtension())), ['php', 'php3', 'php4', 'php5', 'php7', 'php8', 'phtml', 'phar'])) {
$validator = Validator::make([], []);
$validator->errors()->add($key, __('Failed to upload.'));

Expand Down

0 comments on commit 7f4a645

Please sign in to comment.