Commit 55537a44 authored by Matthias Larisch's avatar Matthias Larisch Committed by Matthias Larisch

Image size checks when parsing email images

parent 8d509e83
......@@ -389,9 +389,9 @@ class EmailControl extends Control
}
copy($file, $new_path . $new_filename);
$fimage = new fImage($new_path . $new_filename);
if (!empty($src) && $width = $tag->getAttribute('width')) {
if (!empty($src) && $width = $tag->getAttribute('width') && $width < 2000) {
$fimage->resize($width, 0);
} elseif (!empty($src) && $height = $tag->getAttribute('height')) {
} elseif (!empty($src) && $height = $tag->getAttribute('height') && $height < 2000) {
$fimage->resize(0, $height);
}
$fimage->saveChanges();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment