]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
datajson: value_key is necessary in json format
authorEric Leblond <el@stamus-networks.com>
Sun, 8 Jun 2025 07:28:58 +0000 (09:28 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 11 Jun 2025 18:49:18 +0000 (20:49 +0200)
src/detect-dataset.c

index 3f61c01c343040aecc52a2309204140e99eb17b6..a0131f7929c7de674ce054ea1f50e4fee0a45172 100644 (file)
@@ -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