From: Vsevolod Stakhov Date: Mon, 3 Dec 2018 12:31:37 +0000 (+0000) Subject: [Minor] Do not tolerate archives with `text` content type X-Git-Tag: 1.8.3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43ecc1dafc4f0750aea2e0db987280254ddf930b;p=thirdparty%2Frspamd.git [Minor] Do not tolerate archives with `text` content type --- diff --git a/src/libmime/archives.c b/src/libmime/archives.c index 129863264d..9cfce6968f 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; + } } } }