From afea311da6ed5eedba857bdb4acd25f88469a235 Mon Sep 17 00:00:00 2001 From: Eauldane Date: Sun, 14 Sep 2025 22:48:15 +0100 Subject: [PATCH] Mores sensible timeout, it's just checking the start of a string (why is that even Regex?) --- .../Services/AccountRegistrationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MareSynchronosServer/MareSynchronosAuthService/Services/AccountRegistrationService.cs b/MareSynchronosServer/MareSynchronosAuthService/Services/AccountRegistrationService.cs index ea97336..42d731b 100644 --- a/MareSynchronosServer/MareSynchronosAuthService/Services/AccountRegistrationService.cs +++ b/MareSynchronosServer/MareSynchronosAuthService/Services/AccountRegistrationService.cs @@ -32,7 +32,7 @@ public class AccountRegistrationService private readonly ILogger _logger; private readonly ConcurrentDictionary _registrationsPerIp = new(StringComparer.Ordinal); - private Regex _registrationUserAgentRegex = new Regex(@"^MareSynchronos/", RegexOptions.Compiled, TimeSpan.FromMilliseconds(1000)); + private Regex _registrationUserAgentRegex = new Regex(@"^MareSynchronos/", RegexOptions.Compiled, TimeSpan.FromMilliseconds(50)); public AccountRegistrationService(MareMetrics metrics, MareDbContext mareDbContext, IServiceScopeFactory serviceScopeFactory, IConfigurationService configuration,