commit da6710d: [Minor] Mime_types: Allow empty filename

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Jan 5 15:21:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-01-05 14:49:47 +0000
URL: https://github.com/rspamd/rspamd/commit/da6710da28f290bdb44b75481d0bb7efa901e967

[Minor] Mime_types: Allow empty filename

---
 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 e13d535b4..e9a10bc3c 100644
--- a/src/plugins/lua/mime_types.lua
+++ b/src/plugins/lua/mime_types.lua
@@ -821,7 +821,7 @@ local full_extensions_map = {
 
 local function check_mime_type(task)
   local function gen_extension(fname)
-    local parts = lua_util.str_split(fname, '.')
+    local parts = lua_util.str_split(fname or '', '.')
 
     local ext = {}
     for n = 1, 2 do


More information about the Commits mailing list