diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-02-03 23:00:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-02-03 23:01:01 +0000 |
commit | 3e6bc06d8357daf92ff761ad68d328b28934f0fd (patch) | |
tree | a4dd67c0f02e13ba9efd21643729af191e8a243c /src | |
parent | 640c01b7d176051a9e861aaa65865f3a66208fdc (diff) | |
download | rspamd-3e6bc06d8357daf92ff761ad68d328b28934f0fd.tar.gz rspamd-3e6bc06d8357daf92ff761ad68d328b28934f0fd.zip |
[Minor] Do not trigger obfuscated archive on undetecde 8bit characters
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/archives.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 ++; |