From: Eric Leblond Date: Sun, 8 Jun 2025 07:28:58 +0000 (+0200) Subject: datajson: value_key is necessary in json format X-Git-Tag: suricata-8.0.0-rc1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43a1ef45ca18f4c7f99f340be4ecf96bc7ce7dd1;p=thirdparty%2Fsuricata.git datajson: value_key is necessary in json format --- 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