]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Broken CT != missing CT
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Jun 2021 13:05:50 +0000 (14:05 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Jun 2021 13:05:50 +0000 (14:05 +0100)
src/libmime/archives.c
src/lua/lua_mimepart.c

index c6e2066f5e0396814aceb7c7cf0761291c437b88..4d7867f67837e5d22dc39ed8a4193b87023f157f 100644 (file)
@@ -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;
+                                       }
                                }
                        }
                }
index b6e5b157d3421f498966fe291338d9b9ed23902c..971aa18ebe61d509ff1e4bfd58c9e8e27cc4f1c4 100644 (file)
@@ -1831,7 +1831,7 @@ lua_mimepart_is_broken (lua_State * L)
                                true : false);
        }
        else {
-               lua_pushboolean (L, true);
+               lua_pushboolean (L, false);
        }
 
        return 1;