Skip to content

Commit

Permalink
Merge pull request #4433 from corentin-soriano/fix_upload_ext
Browse files Browse the repository at this point in the history
Force png image type on avatar upload.
  • Loading branch information
nilsteampassnet authored Oct 30, 2024
2 parents b077213 + 487847d commit a4a36fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/upload.files.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@
null !== ($post_type_upload)
&& $post_type_upload === 'upload_profile_photo'
) {
// get file extension
$ext = (string) pathinfo($filePath, PATHINFO_EXTENSION);
// PNG is the only supported extension
$ext = "png";

// rename the file
rename(
Expand Down

0 comments on commit a4a36fd

Please sign in to comment.