Skip to content

Commit

Permalink
Prevent uploading .phps files
Browse files Browse the repository at this point in the history
  • Loading branch information
aheinze committed Aug 6, 2023
1 parent 6529932 commit 800c05f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Release Notes

## WIP

- Prevent uploading .phps files

## 2.6.2 (2023-07-31)

- Add video frame preview (assets manager)
Expand Down
2 changes: 1 addition & 1 deletion modules/Assets/bootstrap.php
Expand Up @@ -78,7 +78,7 @@
$_sizeAllowed = $max_size ? filesize($files['tmp_name'][$i]) < $max_size : true;

// prevent uploading php files
if ($_isAllowed && in_array(strtolower(pathinfo($_file, PATHINFO_EXTENSION)), ['php', 'phar', 'phtml'])) {
if ($_isAllowed && in_array(strtolower(pathinfo($_file, PATHINFO_EXTENSION)), ['php', 'phar', 'phtml', 'phps'])) {
$_isAllowed = false;
}

Expand Down

0 comments on commit 800c05f

Please sign in to comment.