]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Settings: Another fix of settings application
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Jun 2019 11:22:09 +0000 (12:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Jun 2019 11:22:09 +0000 (12:22 +0100)
src/plugins/lua/settings.lua

index e3e4b8986f532eb17ff03075fa9d421c06534e11..de9ac5c65d5025e2f3407257a2c5fa15e895b177 100644 (file)
@@ -454,14 +454,14 @@ local function check_settings(task)
               -- Extract static settings
               local cached = lua_settings.settings_by_id(s.rule.id)
 
-              if not cached then
+              if not cached or not cached.settings or not cached.settings.apply then
                 rspamd_logger.errx(task, 'unregistered settings id found: %s!', s.rule.id)
               else
                 rspamd_logger.infox(task, "<%s> apply static settings %s (id = %s); %s matched",
                     task:get_message_id(),
                     cached.name, s.rule.id,
                     table.concat(matched, ','))
-                apply_settings(task, cached.settings, s.rule.id)
+                apply_settings(task, cached.settings.apply, s.rule.id)
               end
 
             else