From 0b9aa31ee28799b4f3cd339729d92bc181241c6f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 5 Mar 2017 18:43:05 +0000 Subject: [PATCH] [Fix] Do more heuristical detection for missing CTE Issue: #1480 --- src/libmime/mime_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index b445144e7..c6c80e3f0 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -169,7 +169,9 @@ rspamd_mime_part_get_cte_heuristic (struct rspamd_task *task, while (p < end) { if (*p == '\r' || *p == '\n') { - break; + if (!b64_chars || n8bit || nspaces) { + break; + } } else if (*p == ' ') { nspaces ++; -- 2.39.5