]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Allow to have multiple values for headers as arrays
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 May 2018 16:39:12 +0000 (17:39 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 11 May 2018 16:39:12 +0000 (17:39 +0100)
src/libserver/milter.c

index 3f3772850e7b7b690d67a2ca883d44b162e8be43..c08513ea657cced0c098bc2666991b38d13b6b8b 100644 (file)
@@ -1581,7 +1581,11 @@ rspamd_milter_process_milter_block (struct rspamd_milter_session *session,
                        it = NULL;
 
                        while ((cur = ucl_object_iterate (elt, &it, true)) != NULL) {
-                               LL_FOREACH (cur, cur_elt) {
+                               ucl_object_iter_t *elt_it;
+
+                               elt_it = ucl_object_iterate_new (cur);
+
+                               while ((cur_elt = ucl_object_iterate_safe (elt_it, true)) != NULL) {
                                        if (ucl_object_type (cur_elt) == UCL_STRING) {
                                                hname = g_string_new (ucl_object_key (cur));
                                                hvalue = g_string_new (ucl_object_tostring (cur_elt));
@@ -1626,6 +1630,8 @@ rspamd_milter_process_milter_block (struct rspamd_milter_session *session,
                                                }
                                        }
                                }
+
+                               ucl_object_iterate_free (elt_it);
                        }
                }