From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 8DUjAroBZGKgaQEAbAwnHQ (envelope-from ) for ; Sat, 23 Apr 2022 15:40:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6GwhAroBZGIpzgAAauVa8A (envelope-from ) for ; Sat, 23 Apr 2022 15:40:10 +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 BAD0D9F7C for ; Sat, 23 Apr 2022 15:40:09 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1AE7D5F796; Sat, 23 Apr 2022 13:39:19 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1AD835F78D for ; Sat, 23 Apr 2022 13:39:16 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 889835FC3D; Sat, 23 Apr 2022 09:39:15 -0400 (EDT) Received: (nullmailer pid 3856566 invoked by uid 1000); Sat, 23 Apr 2022 13:38:57 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 09/16] test/git: add known broken test for tag with quotes. Date: Sat, 23 Apr 2022 10:38:41 -0300 Message-Id: <20220423133848.3852688-10-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220423133848.3852688-1-david@tethera.net> References: <20220423133848.3852688-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: HO6WFX3MAM4KECADXQUMIR473QLVYBPN X-Message-ID-Hash: HO6WFX3MAM4KECADXQUMIR473QLVYBPN 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=1650721209; 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=jJtM1cWhPDpwlbfdT5Yu04NIxbL0HQqFAVU3vN+DbEc=; b=PWsYcxemLKTuVglETz5AyTygl/zXanbVEtDkqGJgxtdWe25FaPLEgBcTTbzXVzklQ/udLF pJwwF4Cr2gRUPtSbjRMlNdeTj9NzRodKqECAEynbE9s5JqXKlJsHbqjXtLId+fGtcP0keH cCyWWeQu+hInnVLOhWa7VMGrnVGJbsimLI03K8yyxcNytsJ0l14d5RCBqsENwjAb62Sgl6 Wvm7lj3DWBwGoxQ3fFR6+bb9nImh59HEjdT8pNhcTaR5kDUcysiqdUhsNVtk+mUbRiK3J+ UoFVx8Y65pjOsVwVZM1XiZWlaWFvzSFpncxd0W7ePH8Xr9O/iBBwyC7bSwj8Nw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650721209; a=rsa-sha256; cv=none; b=TF+QnVkzJENSqsX7/FN8o3/HUyzHzf0gfXN5E0WDjzJD7GZNQrtQDM6LkpbCU0yaZcqn6K OjDkJ4vmrmDXjp/S4vci0QvQpeGgDnY/k3VUqu7ctYK8QEqbtIN6UjbMESCvBdn1ZhgBpw DWsa0VXA3EU5+xDPdIyQ2sE48QISzxPNbf/PEijdt7EwL4NnEaAsS3GVW2XUDoAwzbA3Rt aEpDZutbsUaKiNu3SihNAaKLP0gi9s0FetSCEJqIFXDHhzrPv3URl2tD2WY4TK11oI19Ig 8MM4ipGAqbdFt8e5PPNHxraYiJLGn8snX2vyTRzXTkM4zIffAUV8h6LJkMXKjg== 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.01 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: BAD0D9F7C X-Spam-Score: -1.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: TsFDFJm6DXhv 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 417692d4..408a6337 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