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

master
André 2018-09-12 15:50:42 +02:00
parent 1499094b61
commit 1b5409f3fa
1 changed files with 2 additions and 2 deletions

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