unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* bug: subject line with several chunks of base64
@ 2022-12-08 22:02 Emmanuel Beffara
  2022-12-09 11:22 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Beffara @ 2022-12-08 22:02 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug: subject line with several chunks of base64
  2022-12-08 22:02 bug: subject line with several chunks of base64 Emmanuel Beffara
@ 2022-12-09 11:22 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2022-12-09 11:22 UTC (permalink / raw)
  To: Emmanuel Beffara, notmuch

Emmanuel Beffara <manu@beffara.org> 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.fsf@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. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-09 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08 22:02 bug: subject line with several chunks of base64 Emmanuel Beffara
2022-12-09 11:22 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).