]> source.dussan.org Git - rspamd.git/commitdiff
use rspamd_ip object in sender_ip to avoid posting ipv4:port
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Mon, 21 Oct 2024 16:35:03 +0000 (18:35 +0200)
committerDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Mon, 21 Oct 2024 16:38:40 +0000 (18:38 +0200)
src/plugins/lua/elastic.lua

index e0e941b60b86efd953243deba9cde2b441fe4884..f525461aee40c7e0c11dce5224aeaa0ffa541971 100644 (file)
@@ -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