aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordenpamusic <denpa@netfleet.space>2019-10-23 11:34:32 +0300
committerdenpamusic <denpa@netfleet.space>2019-10-23 11:34:32 +0300
commit66c07a2ac7c9a87561c64a43bc9ae8b64594b321 (patch)
tree95feaadd8da828dd14041d2429c0148cfb92ba08
parentdeacaf7c53106146d08cbd96687e653f868b437b (diff)
downloadrspamd-66c07a2ac7c9a87561c64a43bc9ae8b64594b321.tar.gz
rspamd-66c07a2ac7c9a87561c64a43bc9ae8b64594b321.zip
[Minor] Fix x-os-fingerprint header
Pass correct parameter to add_header function and use double when unpacking integers from mempool
-rw-r--r--src/plugins/lua/milter_headers.lua6
1 files 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()