From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gEvRA5sak2McRwAAbAwnHQ (envelope-from ) for ; Fri, 09 Dec 2022 12:23:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iN7bA5sak2OPRgEA9RJhRA (envelope-from ) for ; Fri, 09 Dec 2022 12:23:07 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C1EB61EA63 for ; Fri, 9 Dec 2022 12:23:05 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D49A95FBF8; Fri, 9 Dec 2022 11:23:02 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 560955FB3C for ; Fri, 9 Dec 2022 11:23:00 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 451215FB9E; Fri, 9 Dec 2022 06:22:59 -0500 (EST) Received: (nullmailer pid 2841370 invoked by uid 1000); Fri, 09 Dec 2022 11:22:57 -0000 From: David Bremner To: Emmanuel Beffara , notmuch@notmuchmail.org Subject: Re: bug: subject line with several chunks of base64 In-Reply-To: <20221208230226.GJ2433@beffara.org> References: <20221208230226.GJ2433@beffara.org> Date: Fri, 09 Dec 2022 07:22:57 -0400 Message-ID: <87r0x8es8e.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: CZYGG7I7R7PX73Y46T2PA265XNEX7G4C X-Message-ID-Hash: CZYGG7I7R7PX73Y46T2PA265XNEX7G4C X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670584986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=pfp5eAiPImf2SmhaNC6/0apuKV1uYhsKv121KeNGUXg=; b=fmwjsFb4SxRaq1akwpz5Nhs8nQqNYf2vb7slwwfRwqxMnpJvJVScGts8G6j3pM6tgx0xpL ACEUFs/0ShzA3FT+O4Shv3+Nk5KiZpm1s7gGjI6RxXDxQZuKIv7ZjRIDYQDFcHmq3t6BQb gQoBP1U61TGnGX3MiIpyHpMU8S9tfQdbcZKtZg+PeV7gnHACEf4trCVhd/Qj0smG49DuKk 0dFoyBoGyGRZ9L53ZoRuPXOZr4fF9VYPJlHT/BheDzKulfj81VFSpYHbnE4X3w6lv3a6Sp K1triyYu6vk6Y2MFDYYuvrj6TQpMlaD03UJ4DFuNjNJFMVzwoGI3BCFnvEg39Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670584986; a=rsa-sha256; cv=none; b=jJ8qDEqhlO9bIkFFu44iihYzZJoDR8uyhrz55LLyrSulIRMuXgGc2EJB+IO+XrSY0NmAqW bM30UhAIqhoP+O+2nSjgcpAg6Wv6f2uw75ZVH5TXbLZv4QeJAR7XLXDmar8xun6YnXgoQQ JNjatquKd1Q1VGQ+pq6T/Rkg/ozpM4gQ2vLKfwiAIZBRD3RrQKU/Bn6fxtZFjpMKdTUUDt 1VoYNpLsTf3gYoDu1N37Se6kiMEYX4ptQ8rEz6R+E8aAQwrLLigGd1envvUK+JeQvrC7GW d7KL0BTlvYVTW3RCQGfBLsyXYv0Hh9fdvId2k1IeUQTUzrHb19smBnjfkHVGmg== X-Migadu-Spam-Score: -1.50 X-Spam-Score: -1.50 X-Migadu-Queue-Id: C1EB61EA63 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none X-TUID: cvzCfA3Ex23z 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.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.