mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix!: Use Viewtype::File for messages with invalid images, images of unknown size, images > 50 Mpx (#6825)
BREAKING CHANGE: messages with invalid images, images of unknown size, huge images, will have Viewtype::File After changing the logic of Viewtype selection, I had to fix 3 old tests that used invalid Base64 image data. Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
This commit is contained in:
28
test-data/message/image_4k.eml
Normal file
28
test-data/message/image_4k.eml
Normal file
@@ -0,0 +1,28 @@
|
||||
Received: (Postfix, from userid 1000); Mon, 4 Dec 2006 14:51:39 +0100 (CET)
|
||||
From: Test Sender <sender@testrun.org>
|
||||
Subject: Large image test
|
||||
To: alice@example.org
|
||||
Message-ID: <big-image-test@testrun.org>
|
||||
Date: Thu, 17 Dec 2020 15:38:45 +0100
|
||||
User-Agent: Test-Agent/1.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/mixed;
|
||||
boundary="------------BIG_IMAGE_BOUNDARY"
|
||||
Content-Language: en-US
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------BIG_IMAGE_BOUNDARY
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Here is a 4k image
|
||||
|
||||
--------------BIG_IMAGE_BOUNDARY
|
||||
Content-Type: image/png;
|
||||
name="4k_image.png"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: attachment;
|
||||
filename="4k_image.png"
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAADwAAAAhwCAIAAAAf3FwlAAAAEElEQVR4nAEFAPr/AP////8AAAAFCeiupAAAAABJRU5ErkJggg==
|
||||
--------------BIG_IMAGE_BOUNDARY--
|
||||
28
test-data/message/image_huge_64M.eml
Normal file
28
test-data/message/image_huge_64M.eml
Normal file
@@ -0,0 +1,28 @@
|
||||
Received: (Postfix, from userid 1000); Mon, 4 Dec 2006 14:51:39 +0100 (CET)
|
||||
From: Test Sender <sender@testrun.org>
|
||||
Subject: Large image test
|
||||
To: alice@example.org
|
||||
Message-ID: <huge-image-test@testrun.org>
|
||||
Date: Thu, 17 Dec 2020 15:38:45 +0100
|
||||
User-Agent: Test-Agent/1.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/mixed;
|
||||
boundary="------------HUGE_IMAGE_BOUNDARY"
|
||||
Content-Language: en-US
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
--------------HUGE_IMAGE_BOUNDARY
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Here is a huge image
|
||||
|
||||
--------------HUGE_IMAGE_BOUNDARY
|
||||
Content-Type: image/png;
|
||||
name="huge_image.png"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: attachment;
|
||||
filename="huge_image.png"
|
||||
|
||||
iVBORw0KGgoAAAANSUhEUgAAH0AAAB9ACAIAAACJkzqjAAAAEElEQVR4nAEFAPr/AP////8AAAAFCeiupAAAAABJRU5ErkJggg==
|
||||
--------------HUGE_IMAGE_BOUNDARY--
|
||||
Reference in New Issue
Block a user