]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix parsing of escape characters in quoted pairs
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 10:50:30 +0000 (10:50 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 10:50:30 +0000 (10:50 +0000)
src/libmime/email_addr.c

index f3aa36218e2af29922ac51f5262b2e0d44199e2e..34b2ff81ac21dcfd7169c423e132cbc99728797b 100644 (file)
@@ -407,7 +407,15 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, const gchar *hdr,
                        p ++;
                        break;
                case parse_quoted:
-                       if (*p == '"') {
+                       if (*p == '\\') {
+                               if (p > c) {
+                                       g_string_append_len (ns, c, p - c);
+                               }
+
+                               p ++;
+                               c = p;
+                       }
+                       else if (*p == '"') {
                                if (p > c) {
                                        g_string_append_len (ns, c, p - c);
                                }