From: denpamusic Date: Wed, 23 Oct 2019 08:34:32 +0000 (+0300) Subject: [Minor] Fix x-os-fingerprint header X-Git-Tag: 2.1~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3112%2Fhead;p=thirdparty%2Frspamd.git [Minor] Fix x-os-fingerprint header Pass correct parameter to add_header function and use double when unpacking integers from mempool --- diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index 5d8d24c91d..982b07dd0f 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()