aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-21 13:29:10 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-21 13:29:10 +0000
commitb3d061b0f16404ec3c2dc677484bc8e71b881f00 (patch)
tree096324afa1d45352834241565b54c4ee59d8bb23 /src
parent3c772979bbcfee948054e853aa8325b8e43ac944 (diff)
downloadrspamd-b3d061b0f16404ec3c2dc677484bc8e71b881f00.tar.gz
rspamd-b3d061b0f16404ec3c2dc677484bc8e71b881f00.zip
[Rework] Revert missing thing for broken CT
Diffstat (limited to 'src')
-rw-r--r--src/libmime/archives.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index 5b08dd19b..32a251c94 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -1936,6 +1936,17 @@ rspamd_archives_process (struct rspamd_task *task)
gz_magic, sizeof (gz_magic))) {
rspamd_archive_process_gzip (task, part);
}
+
+ if (part->ct && (part->ct->flags & RSPAMD_CONTENT_TYPE_TEXT) &&
+ part->part_type == RSPAMD_MIME_PART_ARCHIVE &&
+ part->specific.arch) {
+ struct rspamd_archive *arch = part->specific.arch;
+
+ msg_info_task ("found %s archive with incorrect content-type: %T/%T",
+ rspamd_archive_type_str (arch->type),
+ &part->ct->type, &part->ct->subtype);
+ part->ct->flags |= RSPAMD_CONTENT_TYPE_BROKEN;
+ }
}
}
}