]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix mixed case content type processing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Apr 2019 14:57:19 +0000 (15:57 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Apr 2019 14:57:19 +0000 (15:57 +0100)
src/libmime/message.c

index 56f0a0a98b4bbe11fff0650696a4e6eb63713581..9ce8950b77a4f023b545b92068a5043b908afb3d 100644 (file)
@@ -824,8 +824,8 @@ rspamd_message_process_text_part_maybe (struct rspamd_task *task,
                xhtml_tok.begin = "xhtml";
                xhtml_tok.len = 5;
 
-               if (rspamd_ftok_cmp (&mime_part->ct->subtype, &html_tok) == 0 ||
-                               rspamd_ftok_cmp (&mime_part->ct->subtype, &xhtml_tok) == 0) {
+               if (rspamd_ftok_casecmp (&mime_part->ct->subtype, &html_tok) == 0 ||
+                               rspamd_ftok_casecmp (&mime_part->ct->subtype, &xhtml_tok) == 0) {
                        found_html = TRUE;
                }
                else {
@@ -852,7 +852,7 @@ rspamd_message_process_text_part_maybe (struct rspamd_task *task,
                                html_tok.begin = "plain";
                                html_tok.len = 5;
 
-                               if (rspamd_ftok_cmp (&mime_part->ct->subtype, &html_tok) == 0) {
+                               if (rspamd_ftok_casecmp (&mime_part->ct->subtype, &html_tok) == 0) {
                                        found_txt = TRUE;
                                }
                                else {