Files
roundcubemail/tests/MessageRendering/data/greenmail/test-message-rendering@localhost/INBOX/spam-with-image-data-uri.eml
Pablo Zmdl 752b152a23 Check if attachment is actually(!) referred to (#9585)
* Check if "inline" msg part is actually referred to

If there's no reference to it in a sibling HTML part then we handle it
as a classic attachment (which is shown as downloadable).

* Fetch all msg headers also for images to always get Content-Location

Previously all headers were only fetched for message/rfc822, or
if the Content-Type's "name" parameter was set, or if a Content-ID was
set.
The RFC doesn't require neither the "name" parameter nor a Content-ID
for using Content-Location, though, so we shouldn't depend on those.

Instead now all headers are also fetched if the main part of the
Content-Type is "image", to catch more cases.

* Parse HTML for references only on demand

* Typos and comment formatting

* Don't skip test anymore

We want it tested!

* More MR tests with images

* Remove early special handling for "inline" images

We decide later, which attachment is considered "inline" and which
isn't.

* Remove early resolving of references in TNEF parts

* Testing message rendering of TNEF emails

* Don't use image disposition, it's unreliable

* Split adding raw parts and attachments

* Fix renaming variable

* Rename file to make its test be run

* Remove outdated script

* Annotate test cases with GitHub issue numbers

* Fix test case class name

* remove comment

* Test inline image message rendering

* Rename test file to reflect cases better

* Reduce image used in test email

It doesn't change much, but there's also no sense in decoding big images
that we don't use.

* Remove unused variable initialisation
2025-02-09 09:56:43 +01:00

62 lines
4.0 KiB
Plaintext

Delivery-date: Fri, 09 Aug 2024 12:46:49 +0200
MIME-Version: 1.0
Message-ID: <trinity-eb9e559b-1926-4b09-990d-80e9da9a9c35-1723163091112@3c-app-mailcom-bs14>
From: Fressnapf Gutschein <Fressnapf-Gutschein@gmx.co.uk>
Content-Type: multipart/related;
boundary=abmob-f9fb5c85-0819-4385-9568-6687985eef93
Date: Fri, 9 Aug 2024 02:24:51 +0200
Importance: normal
Sensitivity: Normal
Subject: ***SPAM*** wir gratulieren Ihnen recht herzlich.
--abmob-f9fb5c85-0819-4385-9568-6687985eef93
Content-Type: text/html; charset=UTF-8
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="text-align: center;"><a href="https://firebasestorage.googleapis.com/v0/b/project-6510355573021224549.appspot.com/o/08_08_24%2F8%2FFressnapf.html?alt=media&amp;token=b6a90819-bea0-40bd-9ee3-0c6587ec9a72"><span style="font-size:22px;"><strong><span style="color:#ff0000;">wir gratulieren Ihnen recht herzlich.</span></strong></span></a></div>
<div style="text-align: center;"><a href="https://firebasestorage.googleapis.com/v0/b/project-6510355573021224549.appspot.com/o/08_08_24%2F8%2FFressnapf.html?alt=media&amp;token=b6a90819-bea0-40bd-9ee3-0c6587ec9a72"><img src="cid:2478d4f4b6b373ac9292cdbab380ee6bd4e4a16ee4feef5112ac3fe61b1303fe"/></a></div>
<div class="signature">&nbsp;</div></div></body></html>
--abmob-f9fb5c85-0819-4385-9568-6687985eef93
Content-Type: image/png
Content-Disposition: inline
Content-ID: <2478d4f4b6b373ac9292cdbab380ee6bd4e4a16ee4feef5112ac3fe61b1303fe>
Content-Transfer-Encoding: base64
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABzlBMVEXf399CQ0TIyMjHx8eysrJD
RUfFxcW8vb6urq44OTnCw8Ozs7NjaGqBgYHj4+OytbiwsbKrq6ump6fx7ur///8aGhoBAQETExMY
GBgWFhb5+vr6+/v9/v78/f2urq49PT309PX7/PwrKyuPj4/e398wMDB1dXVTU1M7Ozvk5eXh4+KW
lpbm6evg4eFoaGglJiYkJCTx8/P19vbv7/Ds7e3p6urm5+j29vfi4+P4+Pjw8fHu8PHt7/Du7u7p
7OzW2Njw8vPn6+zKy8vz8/Pr7Ozo6elWYmfy9PXx8fHs7vDp7e7a29tBTlXq7e/q6url6eptbW39
/v/v7uvOzs4ODg7l5ubb3d62t7dfanAoKCgfICDt7e7T1tfFxsbAwcEyMjL//fv3+Pj9+vb/7u7X
2dnR0tMWGx0IBwfz+fv19/j6+fDi5+m7u7uoqKiioqKenp5peH9oc3hUYGZkZGRJSks1NTXZ8///
6+v/6umxsrKQmp+RkZGJiYlibnPv+v/m8ff/8vHv6+yMjIx8fHxvb29DQ0Ox5f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