From: Victor Julien Date: Thu, 3 Oct 2019 08:39:06 +0000 (+0200) Subject: detect/reference: implement strict parsing option X-Git-Tag: suricata-5.0.0~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09882ec4cb9e26a6d15758515a964059e69bf072;p=thirdparty%2Fsuricata.git detect/reference: implement strict parsing option --- 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);