Re: bug: subject line with several chunks of base64

2022-12-09 Thread David Bremner
Emmanuel Beffara  writes:

> 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.
>

This looks like the same bug as discussed at

 https://nmbug.notmuchmail.org/nmweb/show/87wn9w4xus@thb.lt

It turns out to be a bug in the GMime library, fixed upstream:

   https://github.com/jstedfast/gmime/commit/1a33a55baafc73b0

As far as I know that's not part of any GMime release yet. 
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


bug: subject line with several chunks of base64

2022-12-08 Thread 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-le...@notmuchmail.org