commit 4028247: Fix pcall() argument in rspamd.lua

GitHub noreply at github.com
Wed Feb 15 13:07:05 UTC 2023


Author: dpetrov67
Date: 2023-02-14 11:53:40 -0500
URL: https://github.com/rspamd/rspamd/commit/4028247ac6bba30731efc1ee346c6752ae6eb3c3

Fix pcall() argument in rspamd.lua

---
 rules/rspamd.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/rspamd.lua b/rules/rspamd.lua
index 98fc5e09e..5d93dec00 100644
--- a/rules/rspamd.lua
+++ b/rules/rspamd.lua
@@ -57,7 +57,7 @@ local rmaps =  rspamd_config:get_all_opt("lua_maps")
 if rmaps and type(rmaps) == 'table' then
   local rspamd_logger = require "rspamd_logger"
   for k,v in pairs(rmaps) do
-    local status,map_or_err = pcall(rspamd_config:add_map(v))
+    local status,map_or_err = pcall(function () return rspamd_config:add_map(v) end)
 
     if not status then
       rspamd_logger.errx(rspamd_config, "cannot add map %s: %s", k, map_or_err)


More information about the Commits mailing list