commit cde1808: [Minor] Allow empty string lists in config

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Aug 24 16:07:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-08-24 13:22:22 +0100
URL: https://github.com/rspamd/rspamd/commit/cde1808617fb86932dc18cbd7a92f9852b32b632

[Minor] Allow empty string lists in config

---
 src/libserver/cfg_rcl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 885ebad4d..ffdc5e596 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -3262,6 +3262,8 @@ rspamd_rcl_parse_struct_string_list (rspamd_mempool_t *pool,
 
 	ucl_object_iterate_free (iter);
 
+#if 0
+	/* WTF: why don't we allow empty list here?? */
 	if (*target == NULL) {
 		g_set_error (err,
 				CFG_RCL_ERROR,
@@ -3272,6 +3274,7 @@ rspamd_rcl_parse_struct_string_list (rspamd_mempool_t *pool,
 				obj->len);
 		return FALSE;
 	}
+#endif
 
 	if (!is_hash && *target != NULL) {
 		*target = g_list_reverse (*target);


More information about the Commits mailing list