From 5751f64b8b05de57d34b4aca9b65b8b90ed47f75 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 22 Dec 2020 15:46:27 +0000 Subject: [PATCH] [Minor] Use less strict rules for pkcs7 detection Issue: #3568 --- src/libmime/content_type.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 7b9c213ca6..cad48a03b8 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -708,8 +708,9 @@ rspamd_content_type_parse (const gchar *in, } /* PKCS7 smime */ - RSPAMD_FTOK_ASSIGN (&srch, "x-pkcs7-mime"); - if (rspamd_ftok_casecmp (&res->subtype, &srch) == 0) { + RSPAMD_FTOK_ASSIGN (&srch, "pkcs7-mime"); + if (rspamd_substring_search (res->subtype.begin, res->subtype.len, + srch.begin, srch.len) != -1) { res->flags |= RSPAMD_CONTENT_TYPE_SMIME; } } -- 2.47.3