From: Daniel Stenberg Date: Tue, 6 Aug 2024 12:34:33 +0000 (+0200) Subject: tests/runner: only allow [!A-Za-z0-9_-] in %if feature names X-Git-Tag: curl-8_10_0~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48818a41af6843fb2099eea3f91b698d0a5d1eee;p=thirdparty%2Fcurl.git tests/runner: only allow [!A-Za-z0-9_-] in %if feature names ... in the %if preprocessor parser. This guards against accidentally getting a carriage-return part of the feature name. Fixes #14403 Closes #14411 --- diff --git a/tests/runner.pm b/tests/runner.pm index 22ca0c7fdc..eeb84bcad4 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -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;