Browse Source

[Fix] Fix mixed case content type processing

tags/1.9.3
Vsevolod Stakhov 5 years ago
parent
commit
2627f99408
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/libmime/message.c

+ 3
- 3
src/libmime/message.c View 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 {

Loading…
Cancel
Save