]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins/fts: Lower-case content types received from script parser
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Mon, 9 Mar 2020 13:52:37 +0000 (09:52 -0400)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 10 Mar 2020 12:09:39 +0000 (12:09 +0000)
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.

src/plugins/fts/fts-parser-script.c

index d07d800a6ace79609b9a0c1b0d9247fd4b2eb9d4..f8f98e3ac55ce21b39d943c69119d96a30211aba 100644 (file)
@@ -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) {