]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Settings: Minor case fix
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Jan 2019 14:35:20 +0000 (14:35 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 Jan 2019 14:35:20 +0000 (14:35 +0000)
src/plugins/lua/settings.lua

index 3004620021b0d0db2c5c8bd5162b3e2b8316e88d..84e76f78c007a7434dc8b791883bfab8622597f6 100644 (file)
@@ -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