]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: case-insensitive comparison for requires
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 4 Jan 2024 10:42:55 +0000 (11:42 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 25 Jan 2024 12:18:03 +0000 (13:18 +0100)
Ticket: 6656
(cherry picked from commit d3218385e942a4a01f3938f0cd7050f5dc7c9a6f)

src/detect-parse.c

index a25d63ed599a9a4bfa5037658cadedbbb7ad0749..78fecb4fdc863c492349ecf307676d0f6edce163 100644 (file)
@@ -897,7 +897,7 @@ static int SigParseOptions(DetectEngineCtx *de_ctx, Signature *s, char *optstr,
 
     /* Check for options that are only to be processed during the
      * first "requires" pass. */
-    bool requires_only = strcmp(optname, "requires") == 0 || strcmp(optname, "sid") == 0;
+    bool requires_only = strcasecmp(optname, "requires") == 0 || strcasecmp(optname, "sid") == 0;
     if ((requires && !requires_only) || (!requires && requires_only)) {
         goto finish;
     }