commit d4b650a: [Minor] Mime_types: Allow application/octet-stream for all extensions

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Aug 27 12:42:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-08-27 13:40:44 +0100
URL: https://github.com/rspamd/rspamd/commit/d4b650a68c1502f2fe0aa910f5bad6eee0f6e11a (HEAD -> master)

[Minor] Mime_types: Allow application/octet-stream for all extensions

---
 src/plugins/lua/mime_types.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index b8647491a..2e5dee967 100644
--- a/src/plugins/lua/mime_types.lua
+++ b/src/plugins/lua/mime_types.lua
@@ -368,7 +368,7 @@ local function check_mime_type(task)
     end
 
     local mt = settings['extension_map'][ext]
-    if mt and ct then
+    if mt and ct and ct ~= 'application/octet-stream' then
       local found
       local mult
       for _,v in ipairs(mt) do
@@ -379,7 +379,7 @@ local function check_mime_type(task)
         end
       end
 
-      if not found  then
+      if not found then
         task:insert_result(settings['symbol_attachment'], mult, ext)
       end
     end


More information about the Commits mailing list