]> 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, 4 Jan 2024 14:51:22 +0000 (15:51 +0100)
Ticket: 6656

src/detect-parse.c

index 45f188df11673468a0c8caba32a3f4866e2c6bc2..bf4684045898e3191a80caf38fd99afe79806b7e 100644 (file)
@@ -902,7 +902,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;
     }