Skip to content

Commit

Permalink
Permit dashboard to open CSS and JS files
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 26, 2023
1 parent 44a88bd commit 3f6f3e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ protected function openMediaFileInEditor(MediaFile $file): void
$binary = $this->findGeneralOpenBinary();
$path = $file->getAbsolutePath();

if (! in_array($file->getExtension(), ['png', 'svg', 'jpg', 'jpeg', 'gif', 'ico'])) {
if (! in_array($file->getExtension(), ['png', 'svg', 'jpg', 'jpeg', 'gif', 'ico', 'css', 'js'])) {
$this->abort(403, sprintf("Refusing to open unsafe file '%s'", basename($path)));
}

Expand Down

0 comments on commit 3f6f3e8

Please sign in to comment.