commit b3d061b: [Rework] Revert missing thing for broken CT
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Nov 21 13:35:13 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-21 13:29:10 +0000
URL: https://github.com/rspamd/rspamd/commit/b3d061b0f16404ec3c2dc677484bc8e71b881f00
[Rework] Revert missing thing for broken CT
---
src/libmime/archives.c | 11 +++++++++++
1 file changed, 11 insertions(+)
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;
+ }
}
}
}
More information about the Commits
mailing list