]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix parsing of '=' character in headers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Dec 2016 12:02:45 +0000 (12:02 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Dec 2016 12:02:45 +0000 (12:02 +0000)
src/libmime/mime_headers.c
test/lua/unit/rfc2047.lua

index 7cfe3112c5604ea792ffd8edb20648ceef06c1fc..f2f2c2270b4346712f7247fb5e22f1055ab54405 100644 (file)
@@ -388,6 +388,7 @@ rspamd_mime_header_decode (rspamd_mempool_t *pool, const gchar *in,
                        else {
                                g_string_append_len (out, c, 2);
                                c = p + 1;
+                               state = parse_normal;
                        }
                        p ++;
                        break;
index 9ddab000ce340235864136c9944f61b6e858b3bc..80c90437cfc6f5d58b508d567c6a04f7c1701d45 100644 (file)
@@ -41,6 +41,8 @@ context("RFC2047 decoding", function()
  =?windows-1251?Q?=E0=EA=F2=E5=F0=E8=E7=EE=E2=E0=F2=FC=F1?=
  =?windows-1251?Q?=FF_=E7=EE=F0=EA=E8=EC_=E7=F0=E5=ED=E8?=
  =?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;'},
     }
 
     local pool = ffi.C.rspamd_mempool_new(4096, "lua")