commit 0c18f2f: [Fix] Fix parsing of escape characters in quoted pairs
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Nov 18 10:56:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-11-18 10:50:30 +0000
URL: https://github.com/rspamd/rspamd/commit/0c18f2f9fbcf581bf398bc3c30d1a78648b50911 (HEAD -> master)
[Fix] Fix parsing of escape characters in quoted pairs
---
src/libmime/email_addr.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
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);
}
More information about the Commits
mailing list