commit 4f127cf: 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

Nishil Shah nshah at nightwatchapp.com
Thu Mar 2 11:21:03 UTC 2023


Author: Nishil Shah
Date: 2023-02-28 18:05:42 -0800
URL: https://github.com/rspamd/rspamd/commit/4f127cf8dce3a329deea7ba18bc754a6ab4a22b6 (refs/pull/4416/head)

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

---
 src/plugins/lua/milter_headers.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


More information about the Commits mailing list