Re: [PATCH v2 1/2] test: add known broken tests for known broken RFC 2047 encodings
authorAustin Clements <amdragon@MIT.EDU>
Wed, 11 Sep 2013 18:37:49 +0000 (14:37 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:05 +0000 (09:57 -0800)
c1/8527d62480f52dce8595d0ee37eb83caa6b6ce [new file with mode: 0644]

diff --git a/c1/8527d62480f52dce8595d0ee37eb83caa6b6ce b/c1/8527d62480f52dce8595d0ee37eb83caa6b6ce
new file mode 100644 (file)
index 0000000..d9bbb13
--- /dev/null
@@ -0,0 +1,116 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 394CF431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 11:38:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id IfTaRLFTmifa for <notmuch@notmuchmail.org>;\r
+       Wed, 11 Sep 2013 11:37:55 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu\r
+       [18.9.25.12])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1E37C431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 11:37:55 -0700 (PDT)\r
+X-AuditID: 1209190c-b7fac8e000006335-c3-5230b882e49e\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 1B.73.25397.288B0325; Wed, 11 Sep 2013 14:37:54 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r8BIbqTN005308; \r
+       Wed, 11 Sep 2013 14:37:53 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r8BIbo37017419\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Wed, 11 Sep 2013 14:37:51 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VJpIT-0006X4-TO; Wed, 11 Sep 2013 14:37:49 -0400\r
+Date: Wed, 11 Sep 2013 14:37:49 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH v2 1/2] test: add known broken tests for known broken RFC\r
+       2047 encodings\r
+Message-ID: <20130911183749.GJ1426@mit.edu>\r
+References: <8738pcjet4.fsf@awakening.csail.mit.edu>\r
+       <1378921003-14639-1-git-send-email-jani@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <1378921003-14639-1-git-send-email-jani@nikula.org>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsUixG6notu0wyDIYMIEOYvW7s9MFk3TnS2u\r
+       35zJ7MDscba7ndXj1v3X7B7PVt1iDmCO4rJJSc3JLEst0rdL4MpoO7GIuWAWf8WLh7tYGxhb\r
+       eLsYOTkkBEwkJnf8Z4awxSQu3FvPBmILCexjlFhxNa+LkQvI3sgo8WXWCSaIxGkmiScb+SAS\r
+       SxglLl9oYOli5OBgEVCVmLHaFKSGTUBDYtv+5YwgtoiAosTmk/vBbGYBD4n7c3rA5ggLxEnM\r
+       PLCDFaSVV0BbYt70YIjxWRIN/7exgti8AoISJ2c+YYFoVZf4M+8SM0g5s4C0xPJ/HBBheYnm\r
+       rbPBzucUcJC4sXop2HRRARWJKSe3sU1gFJ6FZNIsJJNmIUyahWTSAkaWVYyyKblVurmJmTnF\r
+       qcm6xcmJeXmpRbqGermZJXqpKaWbGEExwSnJs4PxzUGlQ4wCHIxKPLwdswyChFgTy4orcw8x\r
+       SnIwKYnyRm8HCvEl5adUZiQWZ8QXleakFh9ilOBgVhLhbZ8AlONNSaysSi3Kh0lJc7AoifOu\r
+       c9IPEhJITyxJzU5NLUgtgsnKcHAoSfAmggwVLEpNT61Iy8wpQUgzcXCCDOcBGs4LUsNbXJCY\r
+       W5yZDpE/xagoJc5bAJIQAElklObB9cJS1itGcaBXhHk7QKp4gOkOrvsV0GAmoMHfffVBBpck\r
+       IqSkGhgdMoKkZt19McPfX13z0Z7FmnJJerV2fz3S/S4/F2HRPTtBd0fRK7nMHeWlTRN6Uo7I\r
+       RcQ8XHV41tKYgHkf5m43uz3329FLz7ZtZvZXDvw18YfKrW2t9gb3ZzhYiB9knvj66J//V3dz\r
+       r7rc0DH3QYqxysofjCfWpCrtW2vsxaS6ZomW/oIpvwXXK7EUZyQaajEXFScCAOgaHIw0AwAA\r
+Cc: notmuch@notmuchmail.org, Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 11 Sep 2013 18:38:03 -0000\r
+\r
+v2 LGTM.\r
+\r
+Quoth Jani Nikula on Sep 11 at  8:36 pm:\r
+> Some common broken RFC 2047 encodings that we currently let gmime\r
+> parse strictly. We could tell gmime to be forgiving in what it accepts\r
+> as RFC 2047 encoding, making these tests pass.\r
+> ---\r
+>  test/encoding | 18 ++++++++++++++++++\r
+>  1 file changed, 18 insertions(+)\r
+> \r
+> diff --git a/test/encoding b/test/encoding\r
+> index 2e1326e..7372b6b 100755\r
+> --- a/test/encoding\r
+> +++ b/test/encoding\r
+> @@ -29,4 +29,22 @@ add_message '[content-type]="text/plain; charset=iso-8859-2"' \\r
+>  output=$(notmuch search tučňáččí 2>&1 | notmuch_show_sanitize)\r
+>  test_expect_equal "$output" "thread:0000000000000002   2001-01-05 [1/1] Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)"\r
+>  \r
+> +test_begin_subtest "RFC 2047 encoded word with spaces"\r
+> +test_subtest_known_broken\r
+> +add_message '[subject]="=?utf-8?q?encoded word with spaces?="'\r
+> +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
+> +test_expect_equal "$output" "thread:0000000000000003   2001-01-05 [1/1] Notmuch Test Suite; encoded word with spaces (inbox unread)"\r
+> +\r
+> +test_begin_subtest "RFC 2047 encoded words back to back"\r
+> +test_subtest_known_broken\r
+> +add_message '[subject]="=?utf-8?q?encoded-words-back?==?utf-8?q?to-back?="'\r
+> +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
+> +test_expect_equal "$output" "thread:0000000000000004   2001-01-05 [1/1] Notmuch Test Suite; encoded-words-backto-back (inbox unread)"\r
+> +\r
+> +test_begin_subtest "RFC 2047 encoded words without space before or after"\r
+> +test_subtest_known_broken\r
+> +add_message '[subject]="=?utf-8?q?encoded?=word without=?utf-8?q?space?=" '\r
+> +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
+> +test_expect_equal "$output" "thread:0000000000000005   2001-01-05 [1/1] Notmuch Test Suite; encodedword withoutspace (inbox unread)"\r
+> +\r
+>  test_done\r