diff --git a/LiteCharms.Features/Hasher/HashService.cs b/LiteCharms.Features/Hasher/HashService.cs index 853ccb8..fc18e38 100644 --- a/LiteCharms.Features/Hasher/HashService.cs +++ b/LiteCharms.Features/Hasher/HashService.cs @@ -35,7 +35,6 @@ public sealed partial class HashService(IHashids hasher, IOptions("Validation failed: Missing signature string parameter."); - // 1. Sort the parameters alphabetically and exclude the signature parameter to prevent recursive checking var sortedFields = incomingFormData .Where(field => field.Key != "signature") .OrderBy(field => field.Key) @@ -43,19 +42,14 @@ public sealed partial class HashService(IHashids hasher, IOptions(localHashResult.Errors); - // 4. Constant-time secure text comparison to fully block timing analysis attacks bool isValid = string.Equals(localHashResult.Value, incomingSignature, StringComparison.OrdinalIgnoreCase); return Result.Ok(isValid);