aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-06-11 17:36:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-06-11 17:36:50 +0100
commit69f9feb219ec6a7219d88016fb054b5da929bf7b (patch)
tree38b19067f733f5d0b28187ce8c29edd0b9517506 /src
parentc88dd4f13931ac5f878a4e0d44ecb10be8e563be (diff)
downloadrspamd-69f9feb219ec6a7219d88016fb054b5da929bf7b.tar.gz
rspamd-69f9feb219ec6a7219d88016fb054b5da929bf7b.zip
[Minor] Multimap use limits when parsing email addresses
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/multimap.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 356b8f7c9..c9b68ba05 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -233,27 +233,27 @@ end
local function apply_addr_filter(task, filter, input, rule)
if filter == 'email:addr' or filter == 'email' then
- local addr = util.parse_mail_address(input, task:get_mempool())
+ local addr = util.parse_mail_address(input, task:get_mempool(), 1024)
if addr and addr[1] then
return fun.totable(fun.map(function(a) return a.addr end, addr))
end
elseif filter == 'email:user' then
- local addr = util.parse_mail_address(input, task:get_mempool())
+ local addr = util.parse_mail_address(input, task:get_mempool(), 1024)
if addr and addr[1] then
return fun.totable(fun.map(function(a) return a.user end, addr))
end
elseif filter == 'email:domain' then
- local addr = util.parse_mail_address(input, task:get_mempool())
+ local addr = util.parse_mail_address(input, task:get_mempool(, 1024)
if addr and addr[1] then
return fun.totable(fun.map(function(a) return a.domain end, addr))
end
elseif filter == 'email:domain:tld' then
- local addr = util.parse_mail_address(input, task:get_mempool())
+ local addr = util.parse_mail_address(input, task:get_mempool(), 1024)
if addr and addr[1] then
return fun.totable(fun.map(function(a) return util.get_tld(a.domain) end, addr))
end
elseif filter == 'email:name' then
- local addr = util.parse_mail_address(input, task:get_mempool())
+ local addr = util.parse_mail_address(input, task:get_mempool(), 1024)
if addr and addr[1] then
return fun.totable(fun.map(function(a) return a.name end, addr))
end
@@ -473,7 +473,7 @@ local function multimap_callback(task, rule)
ret = r.hash:get_key(value)
end
- lua_util.debugm(N, task, 'found return "%s" for multimap %s', ret,
+ lua_util.debugm(N, task, 'found return "%s" for multimap %s', ret,
rule.symbol)
if ret then