commit 7990096: [Fix] Fix options in rbl symbols
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Oct 8 11:56:07 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-10-08 12:50:44 +0100
URL: https://github.com/rspamd/rspamd/commit/79900965e4537122d9702b21075b4eacbd9b7492 (HEAD -> master)
[Fix] Fix options in rbl symbols
---
src/plugins/lua/rbl.lua | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index a3a9ffb63..7016d9c5e 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -308,14 +308,16 @@ local function gen_rbl_callback(rule)
local function add_dns_request(task, req, forced, is_ip, requests_table, what, whitelist)
local req_str = req
if is_ip then
- req_str = ip_to_rbl(req)
+ req_str = tostring(req)
end
if whitelist and is_whitelisted(task, req, req_str, whitelist, what) then
return
end
- req = req_str
+ if is_ip then
+ req = ip_to_rbl(req)
+ end
if requests_table[req] then
-- Duplicate request
@@ -331,7 +333,7 @@ local function gen_rbl_callback(rule)
local nreq = {
forced = forced,
n = processed,
- orig = req,
+ orig = req_str,
resolve_ip = resolve_ip,
what = what,
}
@@ -354,7 +356,7 @@ local function gen_rbl_callback(rule)
local nreq = {
forced = forced,
n = to_resolve,
- orig = orign,
+ orig = req_str,
resolve_ip = resolve_ip,
what = what,
}
More information about the Commits
mailing list