From: Vsevolod Stakhov Date: Wed, 6 Mar 2019 13:55:05 +0000 (+0000) Subject: [Fix] Fix rfc2047 decoding for CD headers X-Git-Tag: 1.9.0~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7d8bdf6c9e8a9d88a61cd8cf750c8c2e11786e21;p=rspamd.git [Fix] Fix rfc2047 decoding for CD headers --- diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 21a81575d..dc55efe20 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -371,9 +371,13 @@ rspamd_mime_part_get_cd (struct rspamd_task *task, struct rspamd_mime_part *part gsize hlen; hdr = g_ptr_array_index (hdrs, i); - hlen = strlen (hdr->value); - cd = rspamd_content_disposition_parse (hdr->value, hlen, - task->task_pool); + cd = NULL; + + if (hdr->decoded) { + hlen = strlen (hdr->decoded); + cd = rspamd_content_disposition_parse (hdr->decoded, hlen, + task->task_pool); + } if (cd) { /* We still need to check filename */