diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-06-10 17:43:29 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-06-10 17:43:29 +0400 |
commit | 7e6a79047a4675f60227d57b05f9af1b1540bde6 (patch) | |
tree | 5f2482811bf78bf00f7f23d7692e7b91cd24fbf6 /src/plugins/lua | |
parent | 2b5a8d60da266be61d35b285bc14a8c5d71798e7 (diff) | |
download | rspamd-7e6a79047a4675f60227d57b05f9af1b1540bde6.tar.gz rspamd-7e6a79047a4675f60227d57b05f9af1b1540bde6.zip |
Fixes from previous commit.
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/multimap.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/trie.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 5d1312dc2..8a0596115 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -45,12 +45,12 @@ function check_multimap(task) if rule['type'] == 'ip' then if rule['cdb'] then local ip = task:get_from_ip() - if rule['hash']:lookup(ip) then + if ip and rule['hash']:lookup(ip) then task:insert_result(rule['symbol'], 1) end else local ip = task:get_from_ip_num() - if rule['ips']:get_key(ip) then + if ip and rule['ips']:get_key(ip) then task:insert_result(rule['symbol'], 1) end end diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 6b1782a00..152935d8b 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -69,7 +69,7 @@ function check_trie(task) -- Search inside urls urls = task:get_urls() if urls then - for _,url in urls do + for _,url in ipairs(urls) do if trie['trie']:search_text(url:get_text()) then task:insert_result(trie['symbol'], 1) end |