From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cGCXC5KNRGM7fQAAbAwnHQ (envelope-from ) for ; Mon, 10 Oct 2022 23:24:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KGWzCpKNRGPYSQEAG6o9tA (envelope-from ) for ; Mon, 10 Oct 2022 23:24:34 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 8EA2D9430 for ; Mon, 10 Oct 2022 23:24:33 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E9A275F365; Mon, 10 Oct 2022 21:24:30 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 52B145E545 for ; Mon, 10 Oct 2022 21:24:29 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 288455FBC0; Mon, 10 Oct 2022 17:24:28 -0400 (EDT) Received: (nullmailer pid 1584403 invoked by uid 1000); Mon, 10 Oct 2022 21:24:26 -0000 From: David Bremner To: Thibault Polge , notmuch@notmuchmail.org Subject: Re: [PATCH] test: add regression test for Subject with newline. In-Reply-To: <20220923234824.676622-1-david@tethera.net> References: <87wn9w4xus.fsf@thb.lt> <20220923234824.676622-1-david@tethera.net> X-List-To: notmuch Date: Mon, 10 Oct 2022 18:24:26 -0300 Message-ID: <87czaztlrp.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: KR7SZO5OCTI4TUZVWVUFVJ7TTHUBOWLN X-Message-ID-Hash: KR7SZO5OCTI4TUZVWVUFVJ7TTHUBOWLN 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 CC: Daniel Kahn Gillmor , Jakub Wilk 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-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665437073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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=bB3fo+XEMAn/E9t4mW0qEck6ejvwMXN8Jb2a56jlhl4=; b=VnBFfVLxQhTzdhQsnk/Vo8UlNTEjfFuNZoV5d3MKbzPBbl1X0QXUknruINriXgog8sNf/5 K2zLZsinQ9WJESm+7/xEH3mqR8/4SpEJ0dkLshnCMlivJyWtjG4nAFixHMX13LIfp4ZNrk lRRwgkCKHIYOeLNWCchlljUHkjCxGzXGTrDaYcQLwHBFfGeH8b+CNCyiocPYvpMycOIdGa R2MKKYQi5ljXGoLhrz2J2cugdDXgTx0j/Gkk2VJeEaaasMA3K4+WmvvuCsUp8mIKfTvesd EXUFhyqDURon0xOwIgA0HNrX5Os/VSOvCzkQNZC42gYYoGmW7LrxKwgzs5t+jg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665437073; a=rsa-sha256; cv=none; b=VsTp9sORYz0m3nJvaHtX/bgi0DqwFV0GXYQdxtw/wlTuzSWhqCbQvmtaSZTx7xys7mOBSe ifplIjzdH717XsTyUH6gjR47Z2EF02MmrErrWfEmBHHtfLFAYYDJ5DZDDXefhhG82Zxcwj lqrP5utXmH8BtCx1bDSk6HLtWr28M8sXBXAVuNUjip4nZ7bdIupik+x0ex/MO+CMm/dDoR 7gq4FignB7n/HdSpbueIRGRgd31+gxCyQ1rHlVvT5LiE530fpo1ct0TzEu+Hb0WJwGJnak 3vV3kaXxT8sZi9f8kGbr+q7oqk5aGh+WXZhQn++/r70Pw1ompG2mujT9tUXPBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8EA2D9430 X-Spam-Score: -1.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: O5r7tl9h+Rxd David Bremner writes: > This tests the issue reported by Thibault in id:87wn9w4xus.fsf@thb.lt > --- > > I could not duplicate the problem here. Maybe it depends on the version of gmime? > I have 3.2.9 here. Now that I have gmime 3.2.13 I can confirm your bug (my previously posted test fails). It seems the purely a gmime issue (the following reproducer is thanks to Jakub Wilk; on debian it needs the package gir1.2-gmime-3.0). #!/usr/bin/python3 import pathlib import tempfile import gi gi.require_version('GMime', '3.0') from gi.repository import GMime GMime.init() msg = b'''\ Subject: =?UTF-8?B?SGVsbG8=?= =?UTF-8?B?IHdvcmxk?= . ''' with tempfile.NamedTemporaryFile() as tmpfile: tmpfile.write(msg) tmpfile.flush() fp = GMime.StreamFile.open(tmpfile.name, 'r') parser = GMime.Parser.new_with_stream(fp) msg = parser.construct_message() subject = msg.subject expected = 'Hello world' assert subject == expected, f'{subject!r} != {expected!r}'