]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix some more issues about duplicated fuzzy requests
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 May 2017 09:40:20 +0000 (10:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 May 2017 09:40:50 +0000 (10:40 +0100)
src/plugins/fuzzy_check.c

index ab326f0fe9b560e2d69ae98a1410016d5f701f23..1b24b596ae2e1dc9220cc7a06625638f58e6dc04 100644 (file)
@@ -2370,8 +2370,6 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
                                                                if (!skip_existing) {
                                                                        g_ptr_array_add (res, io);
                                                                }
-
-                                                               g_ptr_array_add (res, io);
                                                        }
 
                                                        if (rule->fuzzy_images) {
@@ -2399,8 +2397,6 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
                                                                        if (!skip_existing) {
                                                                                g_ptr_array_add (res, io);
                                                                        }
-
-                                                                       g_ptr_array_add (res, io);
                                                                }
                                                        }
                                                }
@@ -2413,7 +2409,7 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
 
                if (G_LIKELY (!(flags & FUZZY_CHECK_FLAG_NOIMAGES))) {
                        if (mime_part->ct &&
-                                       !(mime_part->flags & RSPAMD_MIME_PART_TEXT) &&
+                                       !(mime_part->flags & RSPAMD_MIME_PART_TEXT|RSPAMD_MIME_PART_IMAGE) &&
                                        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 >=
@@ -2435,8 +2431,6 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
                                                if (!skip_existing) {
                                                        g_ptr_array_add (res, io);
                                                }
-
-                                               g_ptr_array_add (res, io);
                                        }
                                }
                        }