]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not try to parse non-trivial parts as text parts
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Oct 2019 14:31:15 +0000 (15:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Oct 2019 14:31:15 +0000 (15:31 +0100)
src/libmime/message.c

index 0785a3570314f72a6dd896a69e880200230e0e10..cfa8cf97de4734291564e3eb1ce486288be0392c 100644 (file)
@@ -1433,7 +1433,8 @@ rspamd_message_process (struct rspamd_task *task)
                        lua_settop (L, func_pos);
                }
 
-               if (!(part->flags & (RSPAMD_MIME_PART_IMAGE|RSPAMD_MIME_PART_ARCHIVE))) {
+               if (!(part->flags & (RSPAMD_MIME_PART_IMAGE|RSPAMD_MIME_PART_ARCHIVE)) &&
+                               (!part->ct || !(part->ct->flags & (RSPAMD_CONTENT_TYPE_MULTIPART|RSPAMD_CONTENT_TYPE_MESSAGE)))) {
                        rspamd_message_process_text_part_maybe (task, part);
                }
        }