From 3e6bc06d8357daf92ff761ad68d328b28934f0fd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 3 Feb 2022 23:00:26 +0000 Subject: [PATCH] [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 ++; -- 2.39.5