Skip to content

Commit

Permalink
Add regex evaluation timeout (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokarchi authored Feb 22, 2024
1 parent 7f137fe commit 48cbb29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xunit.runner.visualstudio/Utility/RunSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public bool IsMatchingTargetFramework()
}

// This should match .NET versions like 'net6.0' but not .NET Framework version like 'net462'.
static readonly Regex regexNet5Plus = new(@"^net\d+\.\d+$");
static readonly Regex regexNet5Plus = new(@"^net\d+\.\d+$", RegexOptions.Multiline | RegexOptions.Compiled | RegexOptions.IgnoreCase, TimeSpan.FromSeconds(1));

static bool IsNetCore(string targetFrameworkVersion) =>
targetFrameworkVersion.StartsWith(".NETCoreApp,", StringComparison.OrdinalIgnoreCase) ||
Expand Down

0 comments on commit 48cbb29

Please # to comment.