diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-06 13:55:05 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-06 13:55:05 +0000 |
commit | 7d8bdf6c9e8a9d88a61cd8cf750c8c2e11786e21 (patch) | |
tree | 06bb3ee22e014ff41748b53e0f5892e363b813b8 /src/libmime/mime_parser.c | |
parent | 736a5f1d1240dc97f959b437c080fe816164b046 (diff) | |
download | rspamd-7d8bdf6c9e8a9d88a61cd8cf750c8c2e11786e21.tar.gz rspamd-7d8bdf6c9e8a9d88a61cd8cf750c8c2e11786e21.zip |
[Fix] Fix rfc2047 decoding for CD headers
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r-- | src/libmime/mime_parser.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 */ |