Skip to content

Commit 207aa69

Browse files
committed
Limit regex matchTimeout to 100ms
1 parent 13ef7ad commit 207aa69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/api/Nhs.Appointments.Core/ReferenceNumber/V2

src/api/Nhs.Appointments.Core/ReferenceNumber/V2/Provider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public class Provider(
3232
: IProvider
3333
{
3434
//needed for backwards compatibility since we are now checking correctly formatted strings
35-
private Regex BookingReferenceV1Regex => new (@"^\d{2}-\d{2}-\d{6}$");
35+
private Regex BookingReferenceV1Regex => new (@"^\d{2}-\d{2}-\d{6}$", RegexOptions.None, TimeSpan.FromMilliseconds(100));
3636

37-
private Regex BookingReferenceV2Regex => new (@"^\d{4}-\d{5}-\d{4}$");
37+
private Regex BookingReferenceV2Regex => new (@"^\d{4}-\d{5}-\d{4}$", RegexOptions.None, TimeSpan.FromMilliseconds(100));
3838

3939
private IOptions<ReferenceNumberOptions> Options { get; } = options;
4040

0 commit comments

Comments
 (0)