aerc/worker
Thomas Faughnan 5ed849688a parse: remove trailing whitespace from rfc1123z regex
When there is no Date header in a message, aerc falls back to the
Received header and tries to extract an rfc1123z date from it
(introduced in commit d1600e46). The current regex for extracting the
date incorrectly allows for trailing whitespace, causing time.Parse() to
fail inside of parseReceivedHeader(). As a result, the message's date is
shown as "???????????????????" in the message list and as
"0000-12-31 07:03 PM" in the message view (the latter is likely related
to the zero value of time.Time).

Steps to reproduce:
1) Send yourself a message with no Date header, e.g. with msmtp:
printf 'Subject: foo bar\n\nbody text\n' | msmtp --set-date-header=off me@example.com
2) Note the message's displayed date in aerc's message list and message
   view.

Signed-off-by: Thomas Faughnan <tom@tjf.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-08-22 15:46:56 +02:00
..
handlers go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap imap: implement MoveMessages handling 2022-08-22 15:46:53 +02:00
lib parse: remove trailing whitespace from rfc1123z regex 2022-08-22 15:46:56 +02:00
maildir maildir: implement MoveMessages handling 2022-08-22 15:46:54 +02:00
mbox mbox: implement MoveMessages handling 2022-08-22 15:46:52 +02:00
notmuch go: removed io/ioutil 2022-08-22 09:30:19 +02:00
types worker: introduce MoveMessages type 2022-08-22 15:46:51 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
worker_enabled.go mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00