From 8b4384d70b0a94313fb5299485750dcd94d18ed2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 24 Jun 2019 12:31:54 +0100 Subject: [PATCH] [Minor] Settings: Implement implicit enable of the symbols --- src/libserver/rspamd_symcache.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index aa83024b2..4cb44cc33 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -1466,6 +1466,7 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task, what, item->symbol, id); + return FALSE; } @@ -1474,6 +1475,15 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task, !rspamd_symcache_check_id_list (&item->allowed_ids, id)) { + if (task->settings_elt->policy == RSPAMD_SETTINGS_POLICY_IMPLICIT_ALLOW) { + msg_debug_cache_task ("allow execution of %s settings id %ud " + "allows implicit execution of the symbols", + item->symbol, + id); + + return TRUE; + } + if (exec_only) { /* * Special case if any of our virtual children are enabled -- 2.39.5