2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-03-04 01:36:36 +08:00
discourse/spec/fixtures/emails/unsorted_parts.eml
Michael Brown 4b4836f8f1 FIX: Email::Cleaner must tell Mail to not sort body parts on serialisation
The Mail gem sorts MIME parts by content type on serialisation. The default
sort can lead to post-script content incorrectly appearing at the top after
sort.

A concrete example found in the wild is:

* multipart/signed
  * text/plain (actual content)
  * application/pgp-signature
* text/plain (mailing list footer)

After reordering it looks like:

* text/plain (mailing list footer)
* multipart/signed
  * text/plain (actual content)
  * application/pgp-signature

which causes the Mail gem to detect the mailing list footer as the main content
of the message, which is incorrect.
2026-01-15 13:05:25 -05:00

56 lines
2.1 KiB
Text

Subject: [tor-relays] Subject
Date: Wed 14 Jan 2026 06:21:10 PM +0000
Message-ID: <20260103080033.56fdf890@shire.net>
From: Bilbo Baggins via tor-relays <tor-relays@lists.torproject.org>
Reply-To: Bilbo Baggins <bbaggins@shire.net>
Content-Type: multipart/mixed; boundary="===============8958541500975114832=="
--===============8958541500975114832==
Content-Type: multipart/signed; boundary="Sig_/gizYC_1dGsAzUHvksdaMIe2";
protocol="application/pgp-signature"; micalg=pgp-sha256
--Sig_/gizYC_1dGsAzUHvksdaMIe2
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Here is the actual message content.
--=20
kind regards
Bilbo
--Sig_/gizYC_1dGsAzUHvksdaMIe2
Content-Type: application/pgp-signature
Content-Description: Digitale Signatur von OpenPGP
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCAA5FiEEpXefSZn9R6zNZtTQE76RLz2tRfAFAmlYvpEbFIAAAAAABAAO
bWFudTIsMi41KzEuMTEsMiwyAAoJEBO+kS89rUXw8kgP/2jkrwfSWHY6EY4WJjn6
EDEqT00pgpwEn9ZpUqLTreS3/ocfHC4g29HIsxpJcj/bH+hNAx96HEz9YmC4JfEt
LDjYc6D+5NBBFQGy0vaJ/LXLQc63CRE/yySSOYxFBZK+uMytNHoZDTjhfRroICbQ
guoO7A4/VuYrGAzCWQkBUmnBjj2LJhuLDW84ObMXhA/EuNy5FIAqyLZxoGmFEfvu
We5d0Hr3+wihzyrgGiG4u8UGFOyL+/PC11CFQyQ0j03cBzhZ5PVdtkqPNHauAcjQ
Gt/HQmaOSGKq0VODRjiHAe5TuRtV6jOfUNgS1Q2vB4FKYmeDQb82ooNfOiJWy3ey
Jpwgg700ppqgZUclpMPlzxKwi2dT/PSO6yYuy+G5sfa0Hxmn5DsQaiSPMTiEP2WC
NwAENYIuHeQOHWiS8B3oVSRW/naLzkmpfChFnTKGsrhLqKQc/iuvv639aHwg9BP7
YEbWbdpFpIU36czfxoTcDYDR1e4JLWryEFKIgo4TIaz4t17NmkxjXB6dHZKLLAdU
AT6LmL6mOTaXe9ewD9pf9Vf2nG0RGVJyZRUDmFzfU0Rx2qi7KdcmmRpZg/2QtJeA
Pmrv8NFuFEL0BrhTvo7C60m+gjLaXPNClgKEN0vkEzjLp/ZKjI9FslP61xUMg8lQ
3xT/HTkNt9uNH2ziBMXLK+5c
=0Euf
-----END PGP SIGNATURE-----
--Sig_/gizYC_1dGsAzUHvksdaMIe2--
--===============8958541500975114832==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
tor-relays mailing list -- tor-relays@lists.torproject.org
To unsubscribe send an email to tor-relays-leave@lists.torproject.org
--===============8958541500975114832==--