From: David Levine Date: Fri, 18 Mar 2016 02:05:54 +0000 (-0400) Subject: Have fix_boundary() return NOTOK if it couldn't fix a boundary, X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2885665e14e1ca0aaac7d9809be4783b92b4d8d9?ds=inline;hp=-c Have fix_boundary() return NOTOK if it couldn't fix a boundary, so that mhfixmsg won't modify the message. --- 2885665e14e1ca0aaac7d9809be4783b92b4d8d9 diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index 61821c27..cf97d5ff 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -887,6 +887,33 @@ run_test 'mhfixmsg last -outfile '"$actual"' -verbose' \ check "$expected" "$actual" +# check that message is not modified when -fixboundary fails +cat >`mhpath new` < +To: +Subject: mhfixmsg bad boundary test + +This is a multi-part message in MIME format. + +------=_ NextPart_000_1781A1A_01CC1147.81EBA8D4 +Content-Type: text/plain + +The boundary below doesn't match the header boundary. + +------=_ +NextPart_000_1781A1A_01CC1147.81EBA8D4-- +EOF + +cp -p `mhpath last` "$expected" +run_test "mhfixmsg last -outfile $actual" '' +check "$expected" "$actual" + + # check that text/plain part is not added to text/html in multipart/related # when it shouldn't be cat >`mhpath new` <