1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-14 10:52:49 +02:00

[Rspamd] Check if ip is valid (KEEP_SPAM symbol), fixes #1759

This commit is contained in:
André 2018-09-12 15:50:42 +02:00
parent 1499094b61
commit 1b5409f3fa

View File

@ -23,11 +23,11 @@ rspamd_config:register_symbol({
local redis_params = rspamd_parse_redis_server('keep_spam')
local ip = task:get_from_ip()
if not ip then
if not ip:is_valid() then
return false
end
local from_ip_string = ip:to_string()
local from_ip_string = tostring(ip)
ip_check_table = {from_ip_string}
local maxbits = 128