]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not trigger obfuscated archive on undetecde 8bit characters
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Feb 2022 23:00:26 +0000 (23:00 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Feb 2022 23:01:01 +0000 (23:01 +0000)
src/libmime/archives.c

index 3b0e898420383af072bd84220f33ca07feb4208c..1673c24b4ec03132d0de3c83092f28b4bd0d5155 100644 (file)
@@ -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 ++;