diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-24 15:49:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-24 15:49:16 +0100 |
commit | c992064bb2341a021ba5d000e0825d95420ec3b3 (patch) | |
tree | 6da1ec40c2693db4e22a998b22eadb9ab0fc19f4 /src/libmime/images.c | |
parent | 99cc1fcb693f0c08f48776bdc8ba76fc91856737 (diff) | |
download | rspamd-c992064bb2341a021ba5d000e0825d95420ec3b3.tar.gz rspamd-c992064bb2341a021ba5d000e0825d95420ec3b3.zip |
[Project] Rework images detection
Diffstat (limited to 'src/libmime/images.c')
-rw-r--r-- | src/libmime/images.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libmime/images.c b/src/libmime/images.c index 073776359..faa7a6b2e 100644 --- a/src/libmime/images.c +++ b/src/libmime/images.c @@ -50,14 +50,13 @@ rspamd_images_process (struct rspamd_task *task) { guint i; struct rspamd_mime_part *part; - rspamd_ftok_t srch; - - RSPAMD_FTOK_ASSIGN (&srch, "image"); PTR_ARRAY_FOREACH (MESSAGE_FIELD (task, parts), i, part) { if (!(part->flags & (RSPAMD_MIME_PART_TEXT|RSPAMD_MIME_PART_ARCHIVE))) { - if (rspamd_ftok_cmp (&part->ct->type, &srch) == 0 && + if (part->detected_type && + strcmp (part->detected_type, "image") == 0 && part->parsed_data.len > 0) { + process_image (task, part); } } |