From: Josef 'Jeff' Sipek Date: Mon, 9 Mar 2020 13:52:37 +0000 (-0400) Subject: plugins/fts: Lower-case content types received from script parser X-Git-Tag: 2.3.11.2~547 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0090b656db9ca125b1088f57596a498debd0ef58;p=thirdparty%2Fdovecot%2Fcore.git plugins/fts: Lower-case content types received from script parser Later on during the execution, the script parser code does a strcmp() to match the content type of the attachment with that returned by the script. The content type from the mail is already lowercased. --- diff --git a/src/plugins/fts/fts-parser-script.c b/src/plugins/fts/fts-parser-script.c index d07d800a6a..f8f98e3ac5 100644 --- a/src/plugins/fts/fts-parser-script.c +++ b/src/plugins/fts/fts-parser-script.c @@ -97,7 +97,7 @@ static int script_contents_read(struct mail_user *user) } content = array_append_space(&suser->content); - content->content_type = args[0]; + content->content_type = str_lcase(args[0]); content->extensions = (const void *)(args+1); } if (input->stream_errno != 0) {