From 80b6f3c33d7fee066eb33634bec2c0bbe84bc631 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 23 Oct 2017 20:42:45 +0100 Subject: [PATCH] [Fix] Fix bad archive characters stripping MFH: rspamd-1.6 --- src/plugins/lua/mime_types.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index ad5f569f6b..9864472852 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -213,7 +213,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 -- 2.47.3