git-commit-vandalism/t/t5100
Đoàn Trần Công Danh 0b689562ca mailinfo: warn if CRLF found in decoded base64/QP email
When SMTP servers receive 8-bit email messages, possibly with only
LF as line ending, some of them decide to change said LF to CRLF.

Some mailing list softwares, when receive 8-bit email messages,
decide to encode those messages in base64 or quoted-printable.

If an email is transfered through above mail servers, then distributed
by such mailing list softwares, the recipients will receive an email
contains a patch mungled with CRLF encoded inside another encoding.

Thus, such CR (in CRLF) couldn't be dropped by "mailsplit".
Hence, the mailed patch couldn't be applied cleanly.
Such accidents have been observed in the wild [1].

Instead of silently rejecting those messages, let's give our users
some warnings if such CR (as part of CRLF) is found.

[1]: https://nmbug.notmuchmail.org/nmweb/show/m2lf9ejegj.fsf%40guru.guru-group.fi

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-05-10 15:06:22 +09:00
..
.gitattributes
0001mboxrd mailsplit: support unescaping mboxrd messages 2016-06-06 11:14:43 -07:00
0002mboxrd mailsplit: support unescaping mboxrd messages 2016-06-06 11:14:43 -07:00
comment.expect mailinfo: unescape quoted-pair in header fields 2016-09-28 13:21:18 -07:00
comment.in mailinfo: unescape quoted-pair in header fields 2016-09-28 13:21:18 -07:00
embed-from.expect
embed-from.in mailinfo: make ">From" in-body header check more robust 2014-09-16 11:05:46 -07:00
empty
info0001
info0002
info0003 t5100: mailinfo and mailsplit tests. 2006-06-17 16:26:20 -07:00
info0004
info0005
info0006
info0007
info0008
info0009 mailinfo: feed only one line to handle_filter() for QP input 2008-02-15 22:16:34 -08:00
info0010 git-mailinfo: Fix getting the subject from the in-body [PATCH] line 2008-07-13 17:21:15 -07:00
info0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
info0012 Revert "mailinfo: Remove only one set of square brackets" 2009-07-15 15:10:06 -07:00
info0012--message-id
info0013 mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' 2009-01-28 15:12:24 -08:00
info0014
info0014--scissors
info0015 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
info0015--no-inbody-headers
info0016
info0016--no-inbody-headers git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
info0017
info0018 mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
info0018--no-inbody-headers mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
info-from.expect mailinfo: avoid violating strbuf assertion 2008-08-19 19:36:56 -07:00
info-from.in
msg0001
msg0002
msg0003
msg0004
msg0005
msg0006 mailinfo: do not get confused with logical lines that are too long. 2007-02-27 01:02:32 -08:00
msg0007
msg0008 Add a couple more test cases to the suite. 2007-03-12 23:33:41 -07:00
msg0009
msg0010
msg0011 mailinfo: fix MIME multi-part message boundary handling 2008-08-09 01:26:35 -07:00
msg0012 mailinfo: correctly handle multiline 'Subject:' header 2009-01-10 17:54:30 -08:00
msg0012--message-id git-mailinfo: add --message-id 2014-11-25 15:24:55 -08:00
msg0013
msg0014
msg0014--scissors
msg0015 mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
msg0015--no-inbody-headers
msg0016
msg0016--no-inbody-headers
msg0017
msg0018 mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
msg0018--no-inbody-headers mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
nul-b64.expect
nul-b64.in
nul-plain
patch0001
patch0002
patch0003 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0004
patch0005
patch0006 diff --stat: use less columns for change counts 2012-04-30 14:17:26 -07:00
patch0007
patch0008
patch0009
patch0010
patch0011
patch0012 mailinfo: correctly handle multiline 'Subject:' header 2009-01-10 17:54:30 -08:00
patch0012--message-id
patch0013 mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)' 2009-01-28 15:12:24 -08:00
patch0014
patch0014--scissors
patch0015 git am/mailinfo: Don't look at in-body headers when rebasing 2009-11-20 23:14:02 -08:00
patch0015--no-inbody-headers
patch0016
patch0016--no-inbody-headers
patch0017
patch0018 mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
patch0018--no-inbody-headers mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
quoted-cr-info mailinfo: warn if CRLF found in decoded base64/QP email 2021-05-10 15:06:22 +09:00
quoted-cr-msg mailinfo: warn if CRLF found in decoded base64/QP email 2021-05-10 15:06:22 +09:00
quoted-cr-patch mailinfo: warn if CRLF found in decoded base64/QP email 2021-05-10 15:06:22 +09:00
quoted-cr.mbox mailinfo: warn if CRLF found in decoded base64/QP email 2021-05-10 15:06:22 +09:00
quoted-from.expect
quoted-from.in
quoted-string.expect mailinfo: unescape quoted-pair in header fields 2016-09-28 13:21:18 -07:00
quoted-string.in mailinfo: unescape quoted-pair in header fields 2016-09-28 13:21:18 -07:00
rfc2047-info-0001
rfc2047-info-0002 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0003 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0004
rfc2047-info-0005
rfc2047-info-0006
rfc2047-info-0007 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0008 mailinfo: tests for RFC2047 examples 2009-01-28 16:23:21 -08:00
rfc2047-info-0009
rfc2047-info-0010
rfc2047-info-0011
rfc2047-samples.mbox t5100: use ancient encoding syntax for backwards compatibility 2009-05-18 20:53:19 -07:00
sample.mbox mailinfo: handle in-body header continuations 2016-09-21 10:23:11 -07:00
sample.mboxrd mailsplit: support unescaping mboxrd messages 2016-06-06 11:14:43 -07:00