]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/reference: implement strict parsing option
authorVictor Julien <victor@inliniac.net>
Thu, 3 Oct 2019 08:39:06 +0000 (10:39 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 9 Oct 2019 13:26:59 +0000 (15:26 +0200)
src/detect-reference.c

index 5a1dbcc31e927efd8443b7abc726a21884352ab2..68e3003f6dee0b85d69f2cd1fa97d7f474d31cac 100644 (file)
@@ -134,6 +134,12 @@ static DetectReference *DetectReferenceParse(const char *rawstr, DetectEngineCtx
     if (lookup_ref_conf != NULL) {
         ref->key = lookup_ref_conf->url;
     } else {
+        if (SigMatchStrictEnabled(DETECT_REFERENCE)) {
+            SCLogError(SC_ERR_REFERENCE_UNKNOWN,
+                    "unknown reference key \"%s\"", key);
+            goto error;
+        }
+
         SCLogWarning(SC_ERR_REFERENCE_UNKNOWN,
                 "unknown reference key \"%s\"", key);