diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-21 15:26:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-21 15:26:59 +0000 |
commit | a4793bf27353ba89087430bb52fb4308ff168f22 (patch) | |
tree | 0cdc1eb78a4968bb6382f1dab1e57424bfe4916a | |
parent | 066e21615a70a2317c1a0f9747ba090af0b7e1ea (diff) | |
download | rspamd-a4793bf27353ba89087430bb52fb4308ff168f22.tar.gz rspamd-a4793bf27353ba89087430bb52fb4308ff168f22.zip |
[Fix] Do not lowercase Content-Disposition to perform decoding
-rw-r--r-- | src/libmime/content_type.c | 2 | ||||
-rw-r--r-- | test/lua/unit/rfc2047.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libmime/content_type.c b/src/libmime/content_type.c index 1fc1db565..9f37a8782 100644 --- a/src/libmime/content_type.c +++ b/src/libmime/content_type.c @@ -210,7 +210,7 @@ rspamd_content_disposition_parse (const gchar *in, memcpy (val.lc_data, in, len); rspamd_str_lc (val.lc_data, len); - if (rspamd_content_disposition_parser (val.lc_data, len, &val, pool)) { + if (rspamd_content_disposition_parser (in, len, &val, pool)) { res = rspamd_mempool_alloc (pool, sizeof (val)); memcpy (res, &val, sizeof (val)); diff --git a/test/lua/unit/rfc2047.lua b/test/lua/unit/rfc2047.lua index 80c90437c..8c450c47a 100644 --- a/test/lua/unit/rfc2047.lua +++ b/test/lua/unit/rfc2047.lua @@ -43,6 +43,7 @@ context("RFC2047 decoding", function() =?windows-1251?Q?=E5=EC?=]], "Вы сможете характеризоваться зорким зрением"}, {'v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoni.za.org; s=testdkim1;', 'v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoni.za.org; s=testdkim1;'}, + {"=?windows-1251?B?xO7q8+zl7fIuc2NyLnV1ZQ==?=", "Документ.scr.uue"}, } local pool = ffi.C.rspamd_mempool_new(4096, "lua") |