aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-10-24 10:55:39 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-10-24 10:55:39 +0300
commitf0dd9f2bde2b515e4991dd4071276300bd8c4b03 (patch)
treea94551418374ff4b4cd3b3ea8a5d41f6dd213f77 /src
parent80b6f3c33d7fee066eb33634bec2c0bbe84bc631 (diff)
downloadrspamd-f0dd9f2bde2b515e4991dd4071276300bd8c4b03.tar.gz
rspamd-f0dd9f2bde2b515e4991dd4071276300bd8c4b03.zip
[Fix] Fix bad extension check
when next-to-last extension is a number, e.g. 23.10.2017.scr
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/mime_types.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index 986447285..3ca8c15a8 100644
--- a/src/plugins/lua/mime_types.lua
+++ b/src/plugins/lua/mime_types.lua
@@ -122,12 +122,12 @@ local function check_mime_type(task)
task:insert_result(settings['symbol_double_extension'], badness_mult, {
'.' .. ext2 .. '.' .. ext
})
+ return
end
- else
- if badness_mult then
- -- Just bad extension
- task:insert_result(settings['symbol_bad_extension'], badness_mult, ext)
- end
+ end
+ if badness_mult then
+ -- Just bad extension
+ task:insert_result(settings['symbol_bad_extension'], badness_mult, ext)
end
end