Skip to content

Commit

Permalink
MV Auth: Pass IP to content
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyedra committed Aug 15, 2024
1 parent 3836157 commit 6f8a9a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Robust.Shared/Network/IServerUserDataAssociation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Immutable;
using System.Net;
using System.Threading.Tasks;

namespace Robust.Shared.Network;
Expand All @@ -12,7 +13,8 @@ namespace Robust.Shared.Network;
/// </summary>
public interface IServerUserDataAssociation
{
public Task<AssociationResult> AttemptUserDataFromPublicKey(ImmutableArray<byte> publicKey, ImmutableArray<byte> hWId, string requestedUserName);
public Task<AssociationResult> AttemptUserDataFromPublicKey(ImmutableArray<byte> publicKey,
ImmutableArray<byte> hWId, string requestedUserName, IPAddress connectingAddress);

public struct AssociationResult
{
Expand Down
2 changes: 1 addition & 1 deletion Robust.Shared/Network/NetManager.ServerAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private async void HandleHandshake(NetPeerData peer, NetConnection connection)

var serverUserDataAssociation = IoCManager.Resolve<IServerUserDataAssociation>();
var associationResult = await serverUserDataAssociation.AttemptUserDataFromPublicKey(
userPublicKeyImmutableBytes, msgLogin.HWId, msgLogin.PreferredUserName);
userPublicKeyImmutableBytes, msgLogin.HWId, msgLogin.PreferredUserName, ip);

if (associationResult.success && associationResult.userData != null)
{
Expand Down

0 comments on commit 6f8a9a1

Please sign in to comment.