From 49539ea290046901d1110be2138e71b51857415e Mon Sep 17 00:00:00 2001 From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:35:03 +0200 Subject: [PATCH] use rspamd_ip object in sender_ip to avoid posting ipv4:port --- src/plugins/lua/elastic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua index e0e941b60..f525461ae 100644 --- a/src/plugins/lua/elastic.lua +++ b/src/plugins/lua/elastic.lua @@ -495,7 +495,7 @@ local function get_general_metadata(task) local rspamd_ip = require "rspamd_ip" local origin_ip = rspamd_ip.from_string(origin) if origin_ip and origin_ip:is_valid() then - r.sender_ip = origin -- use string here + r.sender_ip = tostring(origin_ip) end end -- 2.39.5