]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix tests 1867/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 11 Sep 2017 14:05:51 +0000 (16:05 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 18 Oct 2017 10:27:43 +0000 (12:27 +0200)
rules/html.lua
src/plugins/lua/antivirus.lua
test/functional/lua/url_tags.lua

index c77ac10f3e7e304b7f54807fa6474e888bec6d5d..7cc0ccc91ae370bfb6b5e41bc50c16a13b3ab126 100644 (file)
@@ -173,13 +173,12 @@ rspamd_config.R_WHITE_ON_WHITE = {
     local tp = task:get_text_parts() -- get text parts in a message
     local ret = false
     local diff = 0.0
-    local normal_len = 0
     local transp_rate = 0
     local arg
 
     for _,p in ipairs(tp) do -- iterate over text parts array using `ipairs`
       if p:is_html() and p:get_html() then -- if the current part is html part
-        normal_len = p:get_length()
+        local normal_len = p:get_length()
         local transp_len = 0
         local hc = p:get_html() -- we get HTML context
 
index 0b9bf0b22115f738a44ee8a6cff4a077d8de5c0c..2cf0aec685ac1cf2934035f499c498a2799302c5 100644 (file)
@@ -728,7 +728,6 @@ local av_types = {
 }
 
 local function add_antivirus_rule(sym, opts)
-  local rule = {}
   if not opts['type'] then
     return nil
   end
@@ -741,7 +740,7 @@ local function add_antivirus_rule(sym, opts)
       opts['type'])
   end
 
-  rule = cfg.configure(opts)
+  local rule = cfg.configure(opts)
 
   if not rule then
     rspamd_logger.errx(rspamd_config, 'cannot configure %s for %s',
index 6c2e07a7f6f143d5a7009da4adffb67111bea697..9dc38ac72d2540f1e91490715fca785c12eeecdb 100644 (file)
@@ -1,3 +1,4 @@
+
 local rspamd_logger = require 'rspamd_logger'
 
 rspamd_config:register_symbol({