From: Vsevolod Stakhov Date: Sat, 27 May 2017 22:43:45 +0000 (+0100) Subject: [Fix] Skip text parts when checking binary parts in fuzzy check X-Git-Tag: 1.5.9~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8900a7e4b7f7365c0e183660099e1ba7889fc3a5;p=rspamd.git [Fix] Skip text parts when checking binary parts in fuzzy check --- 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) {