From 5167bbfe39c4e87c6aeeafce4546ca19878b4fef Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 12 Nov 2020 15:24:20 +0100 Subject: rfc2045: ensure mime boundaries end with a newline or - --- t/1700-mshow.t | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 t/1700-mshow.t (limited to 't') diff --git a/t/1700-mshow.t b/t/1700-mshow.t new file mode 100755 index 0000000..f974026 --- /dev/null +++ b/t/1700-mshow.t @@ -0,0 +1,41 @@ +#!/bin/sh -e +cd ${0%/*} +. ./lib.sh +plan 2 + +# Nested MIME where the outer boundary is a prefix of the inner boundary +cat <tmp +MIME-Version: 1.0 +Content-type: multipart/mixed; charset=iso-8859-1; + boundary="_xec5AqfRYxfhARmklHx" + + +--_xec5AqfRYxfhARmklHx +Content-type: Multipart/alternative; charset=iso-8859-1; + boundary="_xec5AqfRYxfhARmklHx8" + + +--_xec5AqfRYxfhARmklHx8 +Content-type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: 7bit +Content-Disposition: inline + +foo +--_xec5AqfRYxfhARmklHx8 +Content-type: text/html; charset=iso-8859-1 +Content-Transfer-Encoding: Quoted-printable +Content-Disposition: inline + +bar +--_xec5AqfRYxfhARmklHx8-- + +--_xec5AqfRYxfhARmklHx +Content-Type: application/zip +Content-Transfer-Encoding: Base64 + +quux +--_xec5AqfRYxfhARmklHx-- +EOF + +check 'nested mail has 5 attachments' 'mshow -t ./tmp | wc -l | grep 6' +check 'nested mail has text/html attachment' 'mshow -t ./tmp | grep text/html' -- cgit 1.4.1