commit 3e6bc06: [Minor] Do not trigger obfuscated archive on undetecde 8bit characters

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 3 23:07:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-02-03 23:00:26 +0000
URL: https://github.com/rspamd/rspamd/commit/3e6bc06d8357daf92ff761ad68d328b28934f0fd (HEAD -> master)

[Minor] Do not trigger obfuscated archive on undetecde 8bit characters

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

diff --git a/src/libmime/archives.c b/src/libmime/archives.c
index 3b0e89842..1673c24b4 100644
--- a/src/libmime/archives.c
+++ b/src/libmime/archives.c
@@ -148,7 +148,10 @@ rspamd_archive_file_try_utf (struct rspamd_task *task,
 				g_string_append_c (res, '?');
 				msg_info_task("non graph character in archive file name found: 0x%02xd "
 							  "(filename=%T)", (int)*p, arch->archive_name);
-				fentry->flags |= RSPAMD_ARCHIVE_FILE_OBFUSCATED;
+
+				if (*p < 0x7f && (g_ascii_iscntrl(*p) || *p == '\0')) {
+					fentry->flags |= RSPAMD_ARCHIVE_FILE_OBFUSCATED;
+				}
 			}
 
 			p ++;


More information about the Commits mailing list