From 60b538bb04cdf53f9b09f1d6955067544fe657aa Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 27 May 2017 23:43:45 +0100 Subject: [PATCH] [Fix] Skip text parts when checking binary parts in fuzzy check --- src/plugins/fuzzy_check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index dbf88e54f..ccca8eddc 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -2371,7 +2371,9 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule, } if (G_LIKELY (!(flags & FUZZY_CHECK_FLAG_NOIMAGES))) { - if (mime_part->parsed_data.len > 0 && + if (mime_part->ct && + !(mime_part->flags & RSPAMD_MIME_PART_TEXT) && + mime_part->parsed_data.len > 0 && fuzzy_check_content_type (rule, mime_part->ct)) { if (fuzzy_module_ctx->min_bytes <= 0 || mime_part->parsed_data.len >= fuzzy_module_ctx->min_bytes) { -- 2.39.5