From: Vsevolod Stakhov Date: Thu, 17 Jun 2021 13:05:50 +0000 (+0100) Subject: [Minor] Broken CT != missing CT X-Git-Tag: 3.0~284 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa04109d087b2cd31bcd3087fddbd72b3fd87bd8;p=rspamd.git [Minor] Broken CT != missing CT --- diff --git a/src/libmime/archives.c b/src/libmime/archives.c index c6e2066f5..4d7867f67 100644 --- a/src/libmime/archives.c +++ b/src/libmime/archives.c @@ -1951,7 +1951,10 @@ rspamd_archives_process (struct rspamd_task *task) 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; + + if (!(part->ct->flags & RSPAMD_CONTENT_TYPE_MISSING)) { + part->ct->flags |= RSPAMD_CONTENT_TYPE_BROKEN; + } } } } diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index b6e5b157d..971aa18eb 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -1831,7 +1831,7 @@ lua_mimepart_is_broken (lua_State * L) true : false); } else { - lua_pushboolean (L, true); + lua_pushboolean (L, false); } return 1;