bug: subject line with several chunks of base64

Subject: bug: subject line with several chunks of base64

Date: Thu, 8 Dec 2022 23:02:26 +0100

To: notmuch@notmuchmail.org

Cc:

From: Emmanuel Beffara


Hello,

I am stumbling upon what looks to be a bug.

Sometimes I receive messages where a header entry consists of several chunks
of base64-encoded quoted utf-8 text. For instance:

    Subject: =?UTF-8?B?dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZm9yIGRlbW9uc3RyYXRpb24gcHVycA==?=  =?UTF-8?B?b3Nlcw==?=

For such input, `notmuch search` and `notmuch show` (whatever the output
format) consider only the first block as part of the subject, the second block
is ignored. Apparently, this happens when the first block is padded with =
signs as in my example, not when the base64 encoded part is full.

Note that other MUAs treat this header by concatenating the blocks and
ignoring the two spaces between them. At least, mutt does that (as well as
neomutt accessing the message through notmuch) and so do the webmails I could
test with.

This should be fixed, because truncating header lines is certainly an
important problem.

-- 
Emmanuel
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: