Skip to content

Commit

Permalink
Update plupload.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Feb 22, 2022
1 parent bfb8624 commit b592c86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/MicroweberPackages/App/functions/plupload.php
Expand Up @@ -522,22 +522,22 @@
// This will clear exif data - security issue
$imgCreatedFromJpeg = @imagecreatefromjpeg($filePath);
if ($imgCreatedFromJpeg) {
imagejpeg($imgCreatedFromJpeg, $filePath,100);
imagejpeg($imgCreatedFromJpeg, $filePath,100); // this will create fresh new image without exif sensitive data
$valid = true;
}
} else if ($ext === 'png') {

$imgCreatedFromPng = @imagecreatefrompng($filePath);
if ($imgCreatedFromPng) {
imagepng($imgCreatedFromPng, $filePath,100);
imagepng($imgCreatedFromPng, $filePath,100); // this will create fresh new image without exif sensitive data
$valid = true;
}

} else if ($ext === 'gif') {

$imgCreatedFromGif = @imagecreatefromgif($filePath);
if ($imgCreatedFromGif) {
imagegif($imgCreatedFromGif, $filePath,100);
imagegif($imgCreatedFromGif, $filePath,100); // this will create fresh new image without exif sensitive data
$valid = true;
}

Expand Down

0 comments on commit b592c86

Please sign in to comment.