diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-11-05 22:38:03 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-11-05 22:38:03 +0000 |
commit | 8dc300fc2cc5a0df82d59bf4f6b3e7b0e2e79bdf (patch) | |
tree | 87dfaf6e0c71640c0cbf36bf68a815b731819115 /src/plugins | |
parent | e57950d1f51e5ee77e185adb459f8d66f05ce82d (diff) | |
download | rspamd-8dc300fc2cc5a0df82d59bf4f6b3e7b0e2e79bdf.tar.gz rspamd-8dc300fc2cc5a0df82d59bf4f6b3e7b0e2e79bdf.zip |
Fix work with lua 5.2 eventually.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/multimap.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/phishing.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 0366d4843..078c00bc0 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -14,7 +14,7 @@ function split(str, delim, maxNb) local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos - for part, pos in string.gfind(str, pat) do + for part, pos in string.gmatch(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index 4d72ff806..ee66b9d91 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -14,7 +14,7 @@ function phishing_cb (task) local found = false local purl = url:get_phished() if table.maxn(strict_domains) > 0 then - local _,_,tld = string.find(purl:get_host(), '([a-zA-Z0-9%-]+\.[a-zA-Z0-9%-]+)$') + local _,_,tld = string.find(purl:get_host(), '([a-zA-Z0-9%-]+%.[a-zA-Z0-9%-]+)$') if tld then for _,rule in ipairs(strict_domains) do if rule['map']:get_key(tld) then @@ -26,7 +26,7 @@ function phishing_cb (task) end if not found then if domains then - local _,_,tld = string.find(purl:get_host(), '([a-zA-Z0-9%-]+\.[a-zA-Z0-9%-]+)$') + local _,_,tld = string.find(purl:get_host(), '([a-zA-Z0-9%-]+%.[a-zA-Z0-9%-]+)$') if tld then if domains:get_key(tld) then task:insert_result(symbol, 1, purl:get_host()) |