]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix multimap initialization
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 11 Aug 2016 15:08:26 +0000 (16:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 11 Aug 2016 15:08:26 +0000 (16:08 +0100)
src/plugins/lua/multimap.lua

index d17a24bf02e060ef69734f83386fa68be5c67d29..e40cb01ccf10842b60caad84764cc3fac77061ff 100644 (file)
@@ -550,7 +550,7 @@ local function add_multimap_rule(key, newrule)
       return nil
     end
 
-    newrule['redis_key'] = string.match(newrule['map'], '^redis://(.*$)')
+    newrule['redis_key'] = string.match(newrule['map'], '^redis://(.*)$')
 
     if newrule['redis_key'] then
       ret = true
@@ -684,8 +684,6 @@ if opts and type(opts) == 'table' then
       else
         table.insert(rules, rule)
       end
-    else
-      rspamd_logger.errx(rspamd_config, 'parameter ' .. k .. ' is invalid, must be an object')
     end
   end
   -- add fake symbol to check all maps inside a single callback