From 6f8a9a1dc6f84cd8a1a97ed9f2c79a1386842ddc Mon Sep 17 00:00:00 2001 From: Skye <22365940+Skyedra@users.noreply.github.com> Date: Thu, 15 Aug 2024 03:57:50 -0700 Subject: [PATCH] MV Auth: Pass IP to content --- Robust.Shared/Network/IServerUserDataAssociation.cs | 4 +++- Robust.Shared/Network/NetManager.ServerAuth.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Robust.Shared/Network/IServerUserDataAssociation.cs b/Robust.Shared/Network/IServerUserDataAssociation.cs index 5470da3e60a..4a4f584a34d 100644 --- a/Robust.Shared/Network/IServerUserDataAssociation.cs +++ b/Robust.Shared/Network/IServerUserDataAssociation.cs @@ -1,4 +1,5 @@ using System.Collections.Immutable; +using System.Net; using System.Threading.Tasks; namespace Robust.Shared.Network; @@ -12,7 +13,8 @@ namespace Robust.Shared.Network; /// public interface IServerUserDataAssociation { - public Task AttemptUserDataFromPublicKey(ImmutableArray publicKey, ImmutableArray hWId, string requestedUserName); + public Task AttemptUserDataFromPublicKey(ImmutableArray publicKey, + ImmutableArray hWId, string requestedUserName, IPAddress connectingAddress); public struct AssociationResult { diff --git a/Robust.Shared/Network/NetManager.ServerAuth.cs b/Robust.Shared/Network/NetManager.ServerAuth.cs index e803f077936..4d97f192803 100644 --- a/Robust.Shared/Network/NetManager.ServerAuth.cs +++ b/Robust.Shared/Network/NetManager.ServerAuth.cs @@ -235,7 +235,7 @@ private async void HandleHandshake(NetPeerData peer, NetConnection connection) var serverUserDataAssociation = IoCManager.Resolve(); var associationResult = await serverUserDataAssociation.AttemptUserDataFromPublicKey( - userPublicKeyImmutableBytes, msgLogin.HWId, msgLogin.PreferredUserName); + userPublicKeyImmutableBytes, msgLogin.HWId, msgLogin.PreferredUserName, ip); if (associationResult.success && associationResult.userData != null) {