Skip to content

Commit f4948f3

Browse files
committed
chore: specify a timeout for the regex expression
1 parent da5e525 commit f4948f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class OpenApiComponentsRules
1515
/// <summary>
1616
/// The key regex.
1717
/// </summary>
18-
internal static readonly Regex KeyRegex = new(@"^[a-zA-Z0-9\.\-_]+$");
18+
internal static readonly Regex KeyRegex = new(@"^[a-zA-Z0-9\.\-_]+$", RegexOptions.None, TimeSpan.FromMilliseconds(100));
1919

2020
/// <summary>
2121
/// All the fixed fields declared above are objects

0 commit comments

Comments
 (0)