aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-23 20:42:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-23 20:45:10 +0100
commit80b6f3c33d7fee066eb33634bec2c0bbe84bc631 (patch)
tree832c298a78cc45459ded667b2dc0697454535873 /src
parent0e7f79283100244b1d2b4ae5598451fc56a6d3e6 (diff)
downloadrspamd-80b6f3c33d7fee066eb33634bec2c0bbe84bc631.tar.gz
rspamd-80b6f3c33d7fee066eb33634bec2c0bbe84bc631.zip
[Fix] Fix bad archive characters stripping
MFH: rspamd-1.6
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/mime_types.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index ad5f569f6..986447285 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