commit 9c933b1: [Minor] Strip message id from enclosing spaces

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 17 22:14:05 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-02-17 21:34:53 +0000
URL: https://github.com/rspamd/rspamd/commit/9c933b1803ae7a2665a5b12ddda06f3126cb870b (HEAD -> master)

[Minor] Strip message id from enclosing spaces
Issue: #4081

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

diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index b819f0ec5..f4001d640 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -84,6 +84,8 @@ rspamd_mime_header_check_special (struct rspamd_task *task,
 		p = rh->decoded;
 		len = rspamd_strip_smtp_comments_inplace(rh->decoded, strlen(p));
 		rh->decoded[len] = '\0'; /* Zero terminate after stripping */
+		/* Strip surrounding spaces */
+		rh->decoded = g_strstrip (rh->decoded);
 		end = p + len;
 
 		if (*p == '<') {


More information about the Commits mailing list