1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-14 10:57:38 +01:00

post.php: strip metadata from png and webp image file types

This commit is contained in:
Zankaria 2024-04-03 19:51:41 +02:00
parent c3de90075e
commit 9072ce5992

View File

@ -1113,7 +1113,8 @@ if (isset($_POST['delete'])) {
$dont_copy_file = false;
if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg'))) {
$strippable_image_ext = $file['extension'] === 'jpg' || $file['extension'] === 'jpeg' || $file['extension'] === 'webp' || $file['extension'] == 'png';
if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && $strippable_image_ext)) {
if (!$config['redraw_image'] && $config['use_exiftool']) {
try {
$file['size'] = strip_image_metadata($file['tmp_name']);