Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>2021-05-09 20:12:10 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-10 09:06:22 +0300
commit0b689562cafc05b1a36bdea3d025c9ecdf2514bd (patch)
treea98d6735ed5e8c33dd10fee6d4c5c1de9a8b56db /mailinfo.h
parentdd9323b7fbda92b988bbfe835fd75c179a3b4780 (diff)
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>
Diffstat (limited to 'mailinfo.h')
-rw-r--r--mailinfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mailinfo.h b/mailinfo.h
index 79b1d6774e..b394ef9bce 100644
--- a/mailinfo.h
+++ b/mailinfo.h
@@ -24,6 +24,7 @@ struct mailinfo {
struct strbuf charset;
unsigned int format_flowed:1;
unsigned int delsp:1;
+ unsigned int have_quoted_cr:1;
char *message_id;
enum {
TE_DONTCARE, TE_QP, TE_BASE64