Re: [PATCH] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init()
authorAustin Clements <amdragon@MIT.EDU>
Tue, 10 Sep 2013 22:35:53 +0000 (18:35 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:04 +0000 (09:57 -0800)
2b/bb9fdfd2397eb6d166fa4de2d9bf1c13778728 [new file with mode: 0644]

diff --git a/2b/bb9fdfd2397eb6d166fa4de2d9bf1c13778728 b/2b/bb9fdfd2397eb6d166fa4de2d9bf1c13778728
new file mode 100644 (file)
index 0000000..cceb1df
--- /dev/null
@@ -0,0 +1,103 @@
+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 D220F431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 15:36:08 -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 8WvW5NP9HuBX for <notmuch@notmuchmail.org>;\r
+       Tue, 10 Sep 2013 15:36:02 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
+       [18.7.68.35])\r
+       by olra.theworths.org (Postfix) with ESMTP id D50BD431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 15:36:01 -0700 (PDT)\r
+X-AuditID: 12074423-b7f168e00000095a-d5-522f9ed0189a\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 96.52.02394.0DE9F225; Tue, 10 Sep 2013 18:36:00 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r8AMZxQ9002308; \r
+       Tue, 10 Sep 2013 18:36:00 -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 r8AMZub7001412\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Tue, 10 Sep 2013 18:35:58 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VJWXK-0000QY-Cj; Tue, 10 Sep 2013 18:35:54 -0400\r
+Date: Tue, 10 Sep 2013 18:35:53 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: Re: [PATCH] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to\r
+       g_mime_init()\r
+Message-ID: <20130910223553.GI1426@mit.edu>\r
+References: <1378839078-6298-1-git-send-email-jani@nikula.org>\r
+       <522F73A4.90802@fifthhorseman.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <522F73A4.90802@fifthhorseman.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT170wTz/IYNcfKYvW7s9MFtdvzmR2\r
+       YPI4293O6vFs1S3mAKYoLpuU1JzMstQifbsEroy1E+6xF+zhrLiyu521gfEKexcjB4eEgIlE\r
+       e59zFyMnkCkmceHeerYuRi4OIYF9jBJrF29lh3A2MkrM+t7NCuGcZpI4v+MCE4SzhFFi968v\r
+       jCD9LAKqEgefPGAGsdkENCS27V8OFhcR0Jc4c/cCK4jNDFTTuPYiWI2wQJhE3/FfYHFeAW2J\r
+       g8cvsoHYQgLJErOb5rBAxAUlTs58wgLRqyVx499LJpCzmQWkJZb/4wAJcwKN/zZxFzuILSqg\r
+       IjHl5Da2CYxCs5B0z0LSPQuhewEj8ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdM73czBK91JTS\r
+       TYzgsHZR3sH456DSIUYBDkYlHt4bcvpBQqyJZcWVuYcYJTmYlER5n84BCvEl5adUZiQWZ8QX\r
+       leakFh9ilOBgVhLhneoElONNSaysSi3Kh0lJc7AoifOuB0kJpCeWpGanphakFsFkZTg4lCR4\r
+       1YDxKyRYlJqeWpGWmVOCkGbi4AQZzgM0PA+khre4IDG3ODMdIn+KUVFKnPfLXJDRIImM0jy4\r
+       XljaecUoDvSKMK8VSDsPMGXBdb8CGswENPi7L9jgkkSElFQDo1203/T5y87Nj3jOFHrfmqks\r
+       buuRqQVvlspfvfZL4Mt+Kz1LDq1fq5cdZBFyKXidwmTCt6N75sfPl70/JC969EOmcGnjocu7\r
+       llatmFN6Xa7yYNfG9T+0c3aXVPjUrp3+6720VGeDZ//mnbsf9fz/M23D0+81O2Z8cFhxRjOy\r
+       TuXoI/tVRrXP7y9RYinOSDTUYi4qTgQAOp7FmxYDAAA=\r
+Cc: notmuch <notmuch@notmuchmail.org>\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: Tue, 10 Sep 2013 22:36:09 -0000\r
+\r
+Quoth Daniel Kahn Gillmor on Sep 10 at  3:31 pm:\r
+> On 09/10/2013 02:51 PM, Jani Nikula wrote:\r
+> > As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:\r
+> > \r
+> >> Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()\r
+> >> *should* solve the decoding problem mentioned in the thread. This\r
+> >> flag should be safe to pass into g_mime_init() without any bad side\r
+> >> effects and my unit tests do test that code-path.\r
+> \r
+> the result of doing this is that there will become legitimately-crafted\r
+> subject lines that are now unrepresentable.\r
+> \r
+> I'm always leery of trying to improve support for data that doesn't\r
+> follow the standards at the expense of data that *does* follow the\r
+> standards.\r
+> \r
+>      --dkg\r
+\r
+I haven't looked at exactly what workarounds this enables, but if it's\r
+what I'm guessing (RFC 2047 escapes in the middle of RFC 2822 text\r
+tokens), are there really subject lines that this will misinterpret\r
+that weren't obviously crafted to break the workaround?  The RFC 2047\r
+escape sequence was deliberately designed to be obscure, since RFC\r
+2047 itself caused previously "standards-compliant" subject lines to\r
+potentially be interpreted differently.\r