]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove unneeded extension length check 1906/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 6 Nov 2017 15:48:01 +0000 (18:48 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 6 Nov 2017 15:49:56 +0000 (18:49 +0300)
Why do we need to check length of `ext2` here? `badness_mult2` is `true` means `ext2` is known bad extension.

src/plugins/lua/mime_types.lua

index 507ffe65bcad3f853f709d820e1a40a66d16365d..4fa43f09fd751a66faf5ac447db7d461cee72194 100644 (file)
@@ -114,7 +114,7 @@ local function check_mime_type(task)
 
         -- Use the greatest badness multiplier
         if not badness_mult or
-            (badness_mult2 and #ext2 <= 4 and badness_mult < badness_mult2) then
+            (badness_mult2 and badness_mult < badness_mult2) then
           badness_mult = badness_mult2
         end