Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Fix bug in auth log IP address (#230)

Leendert de Borstc86a1f84dba6
diff --git a/src/Utilities/AliasVault.AuthLogging/AuthLoggingService.cs b/src/Utilities/AliasVault.AuthLogging/AuthLoggingService.cs
index bf0ba9c61..e405b6567 100644
--- a/src/Utilities/AliasVault.AuthLogging/AuthLoggingService.cs
+++ b/src/Utilities/AliasVault.AuthLogging/AuthLoggingService.cs
@@ -38,7 +38,7 @@ public class AuthLoggingService(IServiceProvider serviceProvider, IHttpContextAc
EventType = eventType,
IsSuccess = true,
FailureReason = null,
- IpAddress = httpContext?.Connection.RemoteIpAddress?.ToString(),
+ IpAddress = GetIpFromContext(httpContext),
UserAgent = httpContext?.Request.Headers.UserAgent,
RequestPath = httpContext?.Request.Path,
DeviceType = DetermineDeviceType(httpContext),