From 43a1ef45ca18f4c7f99f340be4ecf96bc7ce7dd1 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 8 Jun 2025 09:28:58 +0200 Subject: [PATCH] datajson: value_key is necessary in json format --- src/detect-dataset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/detect-dataset.c b/src/detect-dataset.c index 3f61c01c34..a0131f7929 100644 --- a/src/detect-dataset.c +++ b/src/detect-dataset.c @@ -506,6 +506,10 @@ int DetectDatasetSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawst SCLogError("json format needs a 'context_key' parameter"); return -1; } + if (strlen(value_key) == 0) { + SCLogError("json format needs a 'value_key' parameter"); + return -1; + } } /* if just 'load' is set, we load data from the same dir as the -- 2.47.2