From e73af1dd3a3fbff9d2e5dd900b011b15791feceb Mon Sep 17 00:00:00 2001 From: cryptooda Date: Fri, 15 Aug 2025 22:25:59 +0700 Subject: [PATCH] Fix address whitelist check --- src/Managing.Application/Users/UserService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Managing.Application/Users/UserService.cs b/src/Managing.Application/Users/UserService.cs index 3e7516e..fcc2355 100644 --- a/src/Managing.Application/Users/UserService.cs +++ b/src/Managing.Application/Users/UserService.cs @@ -54,7 +54,7 @@ public class UserService : IUserService $"Message not good : {message} - Address : {address} - User : {name} - Signature : {signature}"); } - if (!_authorizedAddresses.Contains(recoveredAddress.ToLower())) + if (!_authorizedAddresses.Any(a => string.Equals(a, recoveredAddress, StringComparison.OrdinalIgnoreCase))) { _logger.LogWarning($"Address {recoveredAddress} not authorized"); throw new Exception("Address not authorized");