Fixing security hotspots + issues

This commit is contained in:
2025-06-17 19:47:56 +02:00
parent ad1909ef57
commit 11a9696bdd
7 changed files with 13 additions and 12 deletions

View File

@@ -29,7 +29,11 @@ public partial class PasswordUtils
[GeneratedRegex("[^a-zA-Z0-9]")]
private static partial Regex RegexSpecial();
private static readonly Regex RegexIdenticalChars = new(@"(\S)\1{2,}", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex RegexIdenticalChars = new(
@"(\S)\1{2,}",
RegexOptions.IgnoreCase | RegexOptions.Compiled,
TimeSpan.FromMilliseconds(100)
);
public static List<string> ValidatePassword(string password)
{