diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-02-04 20:42:31 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-02-04 20:42:31 +0000 |
commit | 2fe30027a9f30877bb108e887ac74cbbb4a3fe95 (patch) | |
tree | 7b4405b611a81ae7b3cf402f77920c53359cca75 /src | |
parent | 3e6bc06d8357daf92ff761ad68d328b28934f0fd (diff) | |
download | rspamd-2fe30027a9f30877bb108e887ac74cbbb4a3fe95.tar.gz rspamd-2fe30027a9f30877bb108e887ac74cbbb4a3fe95.zip |
[Minor] Improve logging logic
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/archives.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c index 1673c24b4..45fca12f2 100644 --- a/src/libmime/archives.c +++ b/src/libmime/archives.c @@ -146,11 +146,14 @@ rspamd_archive_file_try_utf (struct rspamd_task *task, } else { 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); if (*p < 0x7f && (g_ascii_iscntrl(*p) || *p == '\0')) { - fentry->flags |= RSPAMD_ARCHIVE_FILE_OBFUSCATED; + if (!(fentry->flags & RSPAMD_ARCHIVE_FILE_OBFUSCATED)) { + msg_info_task("suspicious character in archive file name found: 0x%02xd " + "(filename=%T)", + (int) *p, arch->archive_name); + fentry->flags |= RSPAMD_ARCHIVE_FILE_OBFUSCATED; + } } } |