From 0c18f2f9fbcf581bf398bc3c30d1a78648b50911 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 18 Nov 2020 10:50:30 +0000 Subject: [Fix] Fix parsing of escape characters in quoted pairs --- src/libmime/email_addr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/libmime/email_addr.c') diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c index f3aa36218..34b2ff81a 100644 --- a/src/libmime/email_addr.c +++ b/src/libmime/email_addr.c @@ -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); } -- cgit v1.2.3