🐛 Fix api key exists cause regular login 500

This commit is contained in:
2025-08-25 23:30:41 +08:00
parent 8ce5ba50f4
commit d4de5aeac2

View File

@@ -52,7 +52,7 @@ public class AuthService(
riskScore += 1;
else
{
if (!string.IsNullOrEmpty(lastActiveInfo?.Challenge.IpAddress) &&
if (!string.IsNullOrEmpty(lastActiveInfo?.Challenge?.IpAddress) &&
!lastActiveInfo.Challenge.IpAddress.Equals(ipAddress, StringComparison.OrdinalIgnoreCase))
riskScore += 1;
}