diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-21 16:21:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-21 16:21:52 +0100 |
commit | 7cc409339348a0987205404e99ca794af7b9ee3f (patch) | |
tree | 7a0e3f805aaa3ec367c0e74750a88332c02bc101 | |
parent | 6f79a7236f5018437caf084cef4dffa64ceba443 (diff) | |
parent | f0dea1d076ea19d2074b7e5446425b0cb09e7365 (diff) | |
download | rspamd-7cc409339348a0987205404e99ca794af7b9ee3f.tar.gz rspamd-7cc409339348a0987205404e99ca794af7b9ee3f.zip |
Merge pull request #738 from moisseev/arch-ext-caseinsensitive
[Fix] Make extension checks case-insensitive
-rw-r--r-- | src/plugins/lua/mime_types.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index d598f2e8a..1395149b6 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -101,19 +101,19 @@ local function check_mime_type(task) end if ext then - check_extension(settings['bad_extensions'][ext]) + check_extension(settings['bad_extensions'][ext:lower()]) -- Also check for archive bad extension if is_archive then - check_extension(settings['bad_archive_extensions'][ext]) + check_extension(settings['bad_archive_extensions'][ext:lower()]) - if settings['archive_extensions'][ext] then + if settings['archive_extensions'][ext:lower()] then -- Archive in archive task:insert_result(settings['symbol_archive_in_archive'], 1.0, ext) end end - local mt = settings['extension_map'][ext] + local mt = settings['extension_map'][ext:lower()] if mt and ct then local found = nil if (type(mt) == "table") then |