diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-11-19 14:46:11 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-11-19 14:46:11 +0000 |
commit | c14375d20c3628e074af585c399b4e342ed37e07 (patch) | |
tree | 89a5789381fb77b9ac5459c25585e24f0170761e | |
parent | 5aac0be13a65b396fd1c62ff95fb8657cc109a32 (diff) | |
download | rspamd-c14375d20c3628e074af585c399b4e342ed37e07.tar.gz rspamd-c14375d20c3628e074af585c399b4e342ed37e07.zip |
[Minor] Treat empty `from` protocol header as canonical `<>`
Issue: #3983
-rw-r--r-- | src/libserver/protocol.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 654f16113..65d0900df 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -499,6 +499,10 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, case 'f': case 'F': IF_HEADER (FROM_HEADER) { + if (hv_tok->len == 0) { + /* Replace '' with '<>' to fix parsing issue */ + RSPAMD_FTOK_ASSIGN(hv_tok, "<>"); + } task->from_envelope = rspamd_email_address_from_smtp ( hv_tok->begin, hv_tok->len); |