]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] mid: handle incorrect rgexps in the map 951/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 19 Sep 2016 18:38:45 +0000 (21:38 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 19 Sep 2016 18:38:45 +0000 (21:38 +0300)
src/plugins/lua/mid.lua

index 79ed351512a60cf15edcbd74eda46ceb4a29dec0..5c29f5ab47c7226c5eefff40b4cf7170f87d2180 100644 (file)
@@ -50,11 +50,9 @@ local function known_mid_cb(task)
           end
         else
           re[dkim_domain] = rspamd_regexp.create_cached(v)
-          if header then
-            if re[dkim_domain]:match(header) then
+          if header and re[dkim_domain] and re[dkim_domain]:match(header) then
               task:insert_result(settings['symbol_known_mid'], 1, dkim_domain)
               return
-            end
           end
         end
       end