From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oEO9LGVFgWL69gAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:24:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CFaeK2VFgWLDhAEA9RJhRA (envelope-from ) for ; Sun, 15 May 2022 20:24:37 +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 3F99B11D46 for ; Sun, 15 May 2022 20:24:37 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D40F75F782; Sun, 15 May 2022 18:17:32 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 0A8F95F770 for ; Sun, 15 May 2022 18:17:30 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 794AA5FC3D; Sun, 15 May 2022 14:17:29 -0400 (EDT) Received: (nullmailer pid 57826 invoked by uid 1000); Sun, 15 May 2022 18:17:13 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 09/17] test/git: add known broken test for tag with quotes. Date: Sun, 15 May 2022 15:14:14 -0300 Message-Id: <20220515181421.57088-10-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220515181421.57088-1-david@tethera.net> References: <20220515181421.57088-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 35BLKNBW67S5SL5X6QM5RMJARATOKF5O X-Message-ID-Hash: 35BLKNBW67S5SL5X6QM5RMJARATOKF5O X-MailFrom: bremner@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-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652639077; 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=FZumE7XNQNDim2aYuoVwupPsTpxspPqW/Y22Xcv8+hk=; b=n8VLF5mbah5La9Yymy/dO16Jga5YfUPqOHLv+BEF8Mogzl9G+GqnRrvQkiNDNVJ255N8rS ZcGt+NrqJawN4Bfh3H3ZS5IgntokQCsxDl4Hj+G3jSarWUZReNi7Y10ikj1Z/Pn23I61me y50D+twKvfOcFt3noIPqVAqA4wyG6L0XKYvY9Abx5p8+LFp8Om+NAWcvQhALzFdZ/hI/r/ bVBgOlmU23umvgTckB5MukHeHKhnieeFckffOFBG0zJP99Iawt+xS8tYvXixbTflEs1wwh 7ChIUpSxbTormKB0IeyvOgku41dWjpCIBr8CTQL59nYIzFIO6PmD8avDXP6org== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652639077; a=rsa-sha256; cv=none; b=gaM6nFX0Gnp1BksR0IPpotrDlYDxEKp9l6UhH2t8SeJXngE247PZouuqKpDzqJAkDNPC3d 5/tZc3qTBlJuU2Xfoiz7DU8zUeu9T2XzLHH65xxOBhsbsOIOn0RZWl05qhjOOlGYQQzCW4 tGu6LD9J4oZg+rci70sF9Dwf2iZpedVFEaRDWBKcMqrUwqPD/UePOV+JQdKa1CBVz112Ae PPMrQj0tlvya+rTK/6/jQalIc59tc/t7B+s0rZS3XevIqBeA/ReNsmA8K6AzxnAVy+8cE3 jvwsLRwWh+jBJSlgBmDAee6HI6cVv65kvQ/b6r3m9WXtJonUZlH2IwGB/+Cycw== 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.49 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: 3F99B11D46 X-Spam-Score: -1.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: Q36jyoe6gXOg There is current insufficient sanitization and/or escaping of tag names internally in notmuch-git. --- test/T850-git.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/T850-git.sh b/test/T850-git.sh index 994950ed..2badc52d 100755 --- a/test/T850-git.sh +++ b/test/T850-git.sh @@ -19,6 +19,16 @@ git -C tags.git ls-tree -r --name-only HEAD | xargs dirname | sort -u | sed s,ta notmuch search --output=messages '*' | sort > EXPECTED test_expect_equal_file_nonempty EXPECTED OUTPUT +test_begin_subtest "commit, with quoted tag" +test_subtest_known_broken +notmuch git -C clone2.git -p '' clone tags.git +git -C clone2.git ls-tree -r --name-only HEAD | grep /inbox > BEFORE +notmuch tag '+"quoted tag"' '*' +notmuch git -C clone2.git -p '' commit +notmuch tag '-"quoted tag"' '*' +git -C clone2.git ls-tree -r --name-only HEAD | grep /inbox > AFTER +test_expect_equal_file_nonempty BEFORE AFTER + test_begin_subtest "checkout" notmuch dump > BEFORE notmuch tag -inbox '*' -- 2.35.2