From: Vsevolod Stakhov Date: Thu, 26 Mar 2020 12:36:31 +0000 (+0000) Subject: [Minor] Settings: Fix parsing of the settings map X-Git-Tag: 2.5~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcc1c2c29d3e30a80dd9738a50687b5b45e9ea42;p=thirdparty%2Frspamd.git [Minor] Settings: Fix parsing of the settings map --- diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index 7427e779da..b497d43889 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -1038,7 +1038,14 @@ end local settings_map_pool local function process_settings_map(map_text) local parser = ucl.parser() - local res,err = parser:parse_string(map_text) + local res,err + + if type(map_text) == 'string' then + res,err = parser:parse_string(map_text) + else + res,err = parser:parse_text(map_text) + end + if not res then rspamd_logger.warnx(rspamd_config, 'cannot parse settings map: ' .. err) else