From 09882ec4cb9e26a6d15758515a964059e69bf072 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 3 Oct 2019 10:39:06 +0200 Subject: [PATCH] detect/reference: implement strict parsing option --- src/detect-reference.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/detect-reference.c b/src/detect-reference.c index 5a1dbcc31e..68e3003f6d 100644 --- a/src/detect-reference.c +++ b/src/detect-reference.c @@ -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);