From: Vsevolod Stakhov Date: Thu, 24 Jan 2019 14:35:20 +0000 (+0000) Subject: [Minor] Settings: Minor case fix X-Git-Tag: 1.9.0~258 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8d757de7fdd3bbf9a16e244acb60e13de3187699;p=rspamd.git [Minor] Settings: Minor case fix --- diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index 300462002..84e76f78c 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -127,10 +127,17 @@ local function check_query_settings(task) -- settings_id is rspamd text, so need to convert it to string for lua local id_str = tostring(settings_id) local elt = settings_ids[id_str] - if elt and elt['apply'] then - apply_settings(task, elt['apply']) - rspamd_logger.infox(task, "applying settings id %s", id_str) - return true + + if elt then + if elt['whitelist'] then + elt['apply'] = {whitelist = true} + end + + if elt.apply then + apply_settings(task, elt['apply']) + rspamd_logger.infox(task, "applying settings id %s", id_str) + return true + end end end