]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix bad archive characters stripping
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Oct 2017 19:42:45 +0000 (20:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 10 Dec 2017 17:06:24 +0000 (17:06 +0000)
MFH: rspamd-1.6

src/plugins/lua/mime_types.lua

index 469e0c72a6ec70af26e432f8df4240e568b6d7a9..394ee9a99df411c18b3e894aaa9af798091aad34 100644 (file)
@@ -202,7 +202,7 @@ local function check_mime_type(task)
             for _,f in ipairs(fl) do
               -- Strip bad characters
               if f['name'] then
-                f['name'] = f['name']:gsub('[^%s%g]', '?')
+                f['name'] = f['name']:gsub('[\128-\255%s%G]', '?')
               end
 
               if f['encrypted'] then