]> source.dussan.org Git - rspamd.git/commitdiff
Fix disabling symbols 3998/head
authorJean-Louis Dupond <jean-louis@dupond.be>
Mon, 29 Nov 2021 14:53:47 +0000 (15:53 +0100)
committerJean-Louis Dupond <jean-louis@dupond.be>
Mon, 29 Nov 2021 14:53:47 +0000 (15:53 +0100)
If enabled = false, then we should set RSPAMD_SYMBOL_FLAG_DISABLED.
Now setting enabled = true sets RSPAMD_SYMBOL_FLAG_DISABLED. Which is
incorrect.

src/libserver/cfg_rcl.c

index 465503141b241c0eb91332e4a9c7861771742926..aa50cbe42b70a24778db154acc4e4053f4ae73a3 100644 (file)
@@ -539,7 +539,7 @@ rspamd_rcl_symbol_handler (rspamd_mempool_t *pool, const ucl_object_t *obj,
                        return FALSE;
                }
 
-               if (ucl_object_toboolean (elt)) {
+               if (!ucl_object_toboolean (elt)) {
                        flags |= RSPAMD_SYMBOL_FLAG_DISABLED;
                }
        }