aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libmime/images.c7
-rw-r--r--src/libmime/message.c3
2 files changed, 5 insertions, 5 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);
}
}
diff --git a/src/libmime/message.c b/src/libmime/message.c
index cb95945fe..ef725e72c 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1368,7 +1368,6 @@ rspamd_message_process (struct rspamd_task *task)
L = task->cfg->lua_state;
}
- rspamd_images_process (task);
rspamd_archives_process (task);
if (L && rspamd_lua_require_function (L,
@@ -1570,7 +1569,9 @@ rspamd_message_process (struct rspamd_task *task)
}
}
+ rspamd_images_process (task);
rspamd_images_link (task);
+
rspamd_tokenize_meta_words (task);
}