From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 95D356DE135E for ; Sun, 26 May 2019 15:16:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.176 X-Spam-Level: X-Spam-Status: No, score=-0.176 tagged_above=-999 required=5 tests=[AWL=0.025, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pE0fOOan4Ymc for ; Sun, 26 May 2019 15:16:20 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id EF9416DE1326 for ; Sun, 26 May 2019 15:16:19 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1558908978; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=un4psr+7z3cMBMvZPYauLLS8zAxMDaNWbITAg8HejuA=; b=LlnIaNDejXHGZ+HqbUOUBwjghNmjwTQ9qh/n3uqEW5lMbP8Ag97E+uH+ 4uh87D/V1uOzmI+hD8dNuoHokG8iAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1558908977; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=un4psr+7z3cMBMvZPYauLLS8zAxMDaNWbITAg8HejuA=; b=s24tYNGmYpr3A1aT4by4GRHBayT6g8DITdoQFn0C16TkQx6tdiMEv4FD kYHZdzebvPeRbVHtqcRDYskhh8SSS2MYrTMVIgeKR+n+jdr21Ij01Sqmp8 0xFIVKgHBahzJMrASN3RBRor9wTcqEpGiuj6XJv4ShNyFRSSHjb8tr/5Kf kNEt7XyNw2eqQdkcpQfxPqNz5GAbaTUNEFYHYOK4cozuSBZah+rpOI8xQP 8l2fFDtORKIl1AMmZRhzqAHBbQdbqClfPoC6NQudnS8jrL4pb2WOpQwSNr rLg5O2fsg1Z/vhsFzbprcGEzPeBy0u6hNfhjmTzQcwLIo76w8/+0sw== Received: from fifthhorseman.net (cpe-74-71-53-242.nyc.res.rr.com [74.71.53.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id C8EA9F9A2 for ; Sun, 26 May 2019 18:16:17 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 7ECC72126C; Sun, 26 May 2019 18:16:14 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH v2 12/17] test: after reindexing, only legitimate protected subjects are searchable Date: Sun, 26 May 2019 18:16:05 -0400 Message-Id: <20190526221610.2833-13-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190526221610.2833-1-dkg@fifthhorseman.net> References: <20190526221610.2833-1-dkg@fifthhorseman.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2019 22:16:20 -0000 This test scans for all the possible protected headers (including bogus/broken ones) that are present in the protected-headers corpus, trying to make sure that only the ones that are not broken or malformed show up in a search after re-indexing. Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/T356-protected-headers.sh b/test/T356-protected-headers.sh index 0a8d4bfa..0c562c18 100755 --- a/test/T356-protected-headers.sh +++ b/test/T356-protected-headers.sh @@ -115,4 +115,13 @@ test_json_nodes <<<"$output" \ "encrypted": true, "headers": ["Subject"]},"decrypted": {"status": "full"}}' \ 'subject:[0][0][0]["headers"]["Subject"]="Rhinoceros dinner"' +test_begin_subtest "reindex everything, ensure headers are as expected" +notmuch reindex --decrypt=true from:test_suite@notmuchmail.org +output=$(notmuch search --output=messages 'subject:"protected header" or subject:"Rhinoceros" or subject:"draft-melnikov-smime-header-signing" or subject:"valid"' | sort) +test_expect_equal "$output" 'id:encrypted-signed-not-masked@crypto.notmuchmail.org +id:encrypted-signed@crypto.notmuchmail.org +id:nested-rfc822-message@crypto.notmuchmail.org +id:protected-header@crypto.notmuchmail.org +id:subjectless-protected-header@crypto.notmuchmail.org' + test_done -- 2.20.1