commit e07f607: [Fix] Use heuristically detected text parts data

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Oct 7 10:49:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-10-07 11:45:27 +0100
URL: https://github.com/rspamd/rspamd/commit/e07f6079fb33a30714d40fb3b3864d9d13648f82

[Fix] Use heuristically detected text parts data

---
 src/libmime/message.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libmime/message.c b/src/libmime/message.c
index 4169ca0b5..eeb53dc0d 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -816,8 +816,8 @@ rspamd_message_process_text_part_maybe (struct rspamd_task *task,
 	gboolean found_html = FALSE, found_txt = FALSE;
 	enum rspamd_action_type act;
 
-	if (IS_CT_TEXT (mime_part->ct) && (!mime_part->detected_ct ||
-									   IS_CT_TEXT (mime_part->detected_ct))) {
+	if (IS_CT_TEXT (mime_part->ct) || (!mime_part->detected_type ||
+									   strcmp (mime_part->detected_type, "text") == 0)) {
 		found_txt = TRUE;
 
 		html_tok.begin = "html";


More information about the Commits mailing list