]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Check ucl object type
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 27 Aug 2022 22:47:28 +0000 (23:47 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 27 Aug 2022 22:47:28 +0000 (23:47 +0100)
src/libserver/milter.c

index e559495fb03c1ec1fb18307d8bc9ae44e9f3970e..f8ed7be325236e423de8e6951bb0810dda585c8f 100644 (file)
@@ -1697,7 +1697,7 @@ rspamd_milter_extract_single_header (struct rspamd_milter_session *session,
                idx_obj = ucl_object_lookup_any (obj, "order",
                                "index", NULL);
 
-               if (idx_obj) {
+               if (idx_obj && (ucl_object_type (idx_obj) == UCL_INT || ucl_object_type (idx_obj) == UCL_FLOAT)) {
                        idx = ucl_object_toint (idx_obj);
                        has_idx = TRUE;
                }