From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 cIPnFVSVm2KmewEAbAwnHQ (envelope-from ) for ; Sat, 04 Jun 2022 19:24:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6Lz1FFSVm2KvGQEAG6o9tA (envelope-from ) for ; Sat, 04 Jun 2022 19:24:36 +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 20A721CE9F for ; Sat, 4 Jun 2022 19:24:36 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 996BF5F803; Sat, 4 Jun 2022 17:23:48 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9C9DE5F7E4 for ; Sat, 4 Jun 2022 17:23:44 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 1E5DF5FC57; Sat, 4 Jun 2022 13:23:44 -0400 (EDT) Received: (nullmailer pid 1150077 invoked by uid 1000); Sat, 04 Jun 2022 17:23:25 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH v3 09/17] test/git: add known broken test for tag with quotes. Date: Sat, 4 Jun 2022 14:23:05 -0300 Message-Id: <20220604172313.1149879-10-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220604172313.1149879-1-david@tethera.net> References: <20220604172313.1149879-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: SQEWY6VDQLHZROXLUY34SNV6PVDIEGFM X-Message-ID-Hash: SQEWY6VDQLHZROXLUY34SNV6PVDIEGFM 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=1654363476; 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=thfbU84oEZENisIdAbopCbYfNCoiNEm4sz9swDDPZCd8jUYogkUQHRlm50QuKT7Kr50n+J qYBa/siijfbqqbeodQpx1gSax7KXjGO/v+HYwqLAkGXYTl3/r4p0PGD48Ho6mfPYu2/EF5 pYSa2v9XJNRvm1VnxaTj98erR2BsipGQ8fEs+Xe9+Xzo8IBUGXPjTlipkUIgWRT4uDUVXt R0meZBY0UcODe6wRmaTnuevI+e9gBAE/OCQp0+h2sA0MnAZp4Ly8s9orAcHKynH7BGIfu2 HEvyT2boIT014DsrslbOHmGCDawx3eRb5SPu7hO3inH5ef4+LqjFfRyvxx6CqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654363476; a=rsa-sha256; cv=none; b=kuQi1/vZ5dIAxvwV9ETJi9e9ksd+PHlcTssHuyak4oMeicgANpBF5TK9XB71l7JJfVzvJt r6ZoyfLTjPQYXp1m3a2Q2076FBldz+dOgHEyodWGx1e05XSe1UtQ9dWo6NPR2/yvHKba6p EHvoXjORltsNKhluRbvz4Q5VAbQMdDuC5X0CxCF5WU53ePctmwYuE3K24I0IrdP4mP8eUt dX8BDUI/FFGRnS33CQWcMAgB0cfqJ6RIrOfPsf7bHr/24Yic7/OjBUGLkjyavqGZzrMeJy suwbhDqZ34kOhPlHwew/PgANKbU6do2yAFJEjHCSLkkRcLv8OCBC/SzO3XRGtQ== 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.05 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: 20A721CE9F X-Spam-Score: -1.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: uHD3Ye+9ir/k 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