]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Mime_types: Allow application/octet-stream for all extensions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 27 Aug 2021 12:40:44 +0000 (13:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 27 Aug 2021 12:40:44 +0000 (13:40 +0100)
src/plugins/lua/mime_types.lua

index b8647491aa4a3f06404ae6b7ea04ac8181d422ce..2e5dee9677323536b6e923b5e67476a1faeaf311 100644 (file)
@@ -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