commit 8cf694d: [Minor] Allow to disable composites without config breaking
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun Mar 20 17:35:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-03-20 17:32:34 +0000
URL: https://github.com/rspamd/rspamd/commit/8cf694d95480986570ef09057707c6a52cd5fa90 (HEAD -> master)
[Minor] Allow to disable composites without config breaking
Issue: #4078
---
src/libserver/cfg_rcl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index aa50cbe42..8619fcc5e 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1373,6 +1373,12 @@ rspamd_rcl_composite_handler (rspamd_mempool_t *pool,
composite_name = key;
+ const ucl_object_t *val = ucl_object_lookup(obj, "enabled");
+ if (val != NULL && !ucl_object_toboolean(val)) {
+ msg_info_config ("composite %s is disabled", composite_name);
+ return TRUE;
+ }
+
if ((composite = rspamd_composites_manager_add_from_ucl(cfg->composites_manager,
composite_name, obj)) != NULL) {
rspamd_symcache_add_symbol (cfg->cache, composite_name, 0,
More information about the Commits
mailing list