commit e9fec34: [Minor] Do not propagate broken headers flag for attached messages

Vsevolod Stakhov vsevolod at rspamd.com
Mon Apr 3 20:28:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-04-03 21:24:00 +0100
URL: https://github.com/rspamd/rspamd/commit/e9fec3409a40bc89000d97130239a5867a1d6eb7 (HEAD -> master)

[Minor] Do not propagate broken headers flag for attached messages

---
 src/libmime/mime_headers.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index f4001d640..e75a61366 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -237,7 +237,10 @@ rspamd_mime_headers_process (struct rspamd_task *task,
 			}
 			else if (g_ascii_isspace (*p)) {
 				/* Not header but some garbage */
-				task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
+				if (target == MESSAGE_FIELD (task, raw_headers)) {
+					/* Do not propagate flag from the attachments */
+					task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
+				}
 				state = 100;
 				next_state = 0;
 			}


More information about the Commits mailing list