aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/archives.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-03 12:31:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-03 12:31:37 +0000
commit43ecc1dafc4f0750aea2e0db987280254ddf930b (patch)
treeb03f95aa83a20285ee42c0e093121df3f883c3cd /src/libmime/archives.c
parent2e50ad95a3cc6e9f9ec0dbb1cc3523ef00ef0d1f (diff)
downloadrspamd-43ecc1dafc4f0750aea2e0db987280254ddf930b.tar.gz
rspamd-43ecc1dafc4f0750aea2e0db987280254ddf930b.zip
[Minor] Do not tolerate archives with `text` content type
Diffstat (limited to 'src/libmime/archives.c')
-rw-r--r--src/libmime/archives.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index 129863264..9cfce6968 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -1543,6 +1543,13 @@ rspamd_archives_process (struct rspamd_task *task)
sz_magic, sizeof (sz_magic))) {
rspamd_archive_process_7zip (task, part);
}
+
+ if (IS_CT_TEXT (part->ct) &&
+ (part->flags & RSPAMD_MIME_PART_ARCHIVE)) {
+ msg_info_task ("found archive with incorrect content-type: %T/%T",
+ &part->ct->type, &part->ct->subtype);
+ part->ct->flags |= RSPAMD_CONTENT_TYPE_BROKEN;
+ }
}
}
}