]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/runner: only allow [!A-Za-z0-9_-] in %if feature names
authorDaniel Stenberg <daniel@haxx.se>
Tue, 6 Aug 2024 12:34:33 +0000 (14:34 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 6 Aug 2024 22:30:17 +0000 (00:30 +0200)
... in the %if preprocessor parser.

This guards against accidentally getting a carriage-return part of the
feature name.

Fixes #14403
Closes #14411

tests/runner.pm

index 22ca0c7fdc32ba8936ec58315830d3e183b890c9..eeb84bcad4b426aa30a3f9f4a5a745e934ba2d47 100644 (file)
@@ -307,7 +307,7 @@ sub prepro {
     for my $s (@entiretest) {
         my $f = $s;
         $line++;
-        if($s =~ /^ *%if (.*)/) {
+        if($s =~ /^ *%if ([A-Za-z0-9!_-]*)/) {
             my $cond = $1;
             my $rev = 0;