From: Nishil Shah Date: Wed, 1 Mar 2023 02:05:42 +0000 (-0800) Subject: when metric action is not defined, it reads a score causing a type error where the... X-Git-Tag: 3.5~20^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F4416%2Fhead;p=rspamd.git when metric action is not defined, it reads a score causing a type error where the value should be a string and the actual action --- diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index 1c35f89b4..02f50be27 100644 --- a/src/plugins/lua/milter_headers.lua +++ b/src/plugins/lua/milter_headers.lua @@ -360,7 +360,7 @@ local function milter_headers(task) local local_mod = settings.routines['x-rspamd-action'] if skip_wanted('x-rspamd-action') then return end if not common['metric_action'] then - common['metric_action'] = task:get_metric_score() + common['metric_action'] = task:get_metric_action() end local action = common['metric_action'] if local_mod.remove then