commit 66c07a2: [Minor] Fix x-os-fingerprint header
denpamusic
denpa at netfleet.space
Wed Oct 23 11:42:08 UTC 2019
Author: denpamusic
Date: 2019-10-23 11:34:32 +0300
URL: https://github.com/rspamd/rspamd/commit/66c07a2ac7c9a87561c64a43bc9ae8b64594b321 (refs/pull/3112/head)
[Minor] Fix x-os-fingerprint header
Pass correct parameter to add_header function and use double when unpacking integers from mempool
---
src/plugins/lua/milter_headers.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua
index 5d8d24c91..982b07dd0 100644
--- a/src/plugins/lua/milter_headers.lua
+++ b/src/plugins/lua/milter_headers.lua
@@ -422,11 +422,11 @@ local function milter_headers(task)
local os_string, link_type, uptime_min, distance =
task:get_mempool():get_variable('os_fingerprint',
- 'string, string, int, int');
+ 'string, string, double, double');
if not os_string then return end
- local value = string.format('%s, (up: %u min), (distance %i, link: %s)',
+ local value = string.format('%s, (up: %i min), (distance %i, link: %s)',
os_string, uptime_min, distance, link_type)
if settings.routines['x-os-fingerprint'].remove then
@@ -434,7 +434,7 @@ local function milter_headers(task)
= settings.routines['x-os-fingerprint'].remove
end
- add_header(settings.routines['x-os-fingerprint'].header, value)
+ add_header('x-os-fingerprint', value)
end
routines['x-spam-status'] = function()
More information about the Commits
mailing list