]> git.notmuchmail.org Git - notmuch/commit
util/repair: identify and repair "Mixed Up" mangled messages
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 28 May 2019 05:45:12 +0000 (01:45 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 15 Sep 2019 23:06:31 +0000 (19:06 -0400)
commit67666538b3d8e0d10d2778b55d0cd2549a73b274
tree2d69de25af4893dd76397e870b7a4d72c922ff18
parentcb522fb06ef534a485408de608984d1be6dbadfa
util/repair: identify and repair "Mixed Up" mangled messages

Implement a functional identification and repair process for "Mixed
Up" MIME messages as described in
https://tools.ietf.org/html/draft-dkg-openpgp-pgpmime-message-mangling-00#section-4.1

The detection test is not entirely complete, in that it does not
verify the contents of the latter two message subparts, but this is
probably safe to skip, because those two parts are unlikely to be
readable anyway, and the only part we are effectively omitting (the
first subpart) is guaranteed to be empty anyway, so its removal can be
reversed if you want to do so.  I've left FIXMEs in the code so that
anyone excited about adding these additional checks can see where to
put them in.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
util/repair.c
util/repair.h