diff --git a/Source/BNetServer/Networking/Services/Authentication.cs b/Source/BNetServer/Networking/Services/Authentication.cs index 88bcad75f..9cb8f49f7 100644 --- a/Source/BNetServer/Networking/Services/Authentication.cs +++ b/Source/BNetServer/Networking/Services/Authentication.cs @@ -25,7 +25,7 @@ namespace BNetServer.Networking return BattlenetRpcErrorCode.BadProgram; } - if (logonRequest.Platform != "Win" && logonRequest.Platform != "Wn64" && logonRequest.Platform != "Mc64") + if (logonRequest.Platform != "Win" && logonRequest.Platform != "Wn64" && logonRequest.Platform != "Mc64" && logonRequest.Platform != "MacA") { Log.outDebug(LogFilter.Session, $"Battlenet.LogonRequest: {GetClientInfo()} attempted to log in from an unsupported platform (using {logonRequest.Platform})!"); return BattlenetRpcErrorCode.BadPlatform; diff --git a/Source/Framework/Realm/RealmManager.cs b/Source/Framework/Realm/RealmManager.cs index 2a497a449..b63ddba60 100644 --- a/Source/Framework/Realm/RealmManager.cs +++ b/Source/Framework/Realm/RealmManager.cs @@ -36,8 +36,8 @@ public class RealmManager : Singleton void LoadBuildInfo() { - // 0 1 2 3 4 5 6 - SQLResult result = DB.Login.Query("SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, win64AuthSeed, mac64AuthSeed FROM build_info ORDER BY build ASC"); + // 0 1 2 3 4 5 6 7 + SQLResult result = DB.Login.Query("SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, win64AuthSeed, mac64AuthSeed, macArmAuthSeed FROM build_info ORDER BY build ASC"); if (!result.IsEmpty()) { do @@ -59,6 +59,10 @@ public class RealmManager : Singleton if (!mac64AuthSeedHexStr.IsEmpty() && mac64AuthSeedHexStr.Length == build.Mac64AuthSeed.Length * 2) build.Mac64AuthSeed = mac64AuthSeedHexStr.ToByteArray(); + string macArmAuthSeedHexStr = result.Read(7); + if (macArmAuthSeedHexStr.IsEmpty() && mac64AuthSeedHexStr.Length == build.MacArmAuthSeed.Length * 2) + build.MacArmAuthSeed = macArmAuthSeedHexStr.ToByteArray(); + _builds.Add(build); } while (result.NextRow()); @@ -400,4 +404,5 @@ public class RealmBuildInfo public char[] HotfixVersion = new char[4]; public byte[] Win64AuthSeed = new byte[16]; public byte[] Mac64AuthSeed = new byte[16]; + public byte[] MacArmAuthSeed = new byte[16]; } diff --git a/Source/Game/Networking/WorldSocket.cs b/Source/Game/Networking/WorldSocket.cs index 38e971661..ada02766b 100644 --- a/Source/Game/Networking/WorldSocket.cs +++ b/Source/Game/Networking/WorldSocket.cs @@ -489,6 +489,8 @@ namespace Game.Networking digestKeyHash.Finish(buildInfo.Win64AuthSeed); else if (account.game.OS == "Mc64") digestKeyHash.Finish(buildInfo.Mac64AuthSeed); + else if (account.game.OS == "MacA") + digestKeyHash.Finish(buildInfo.MacArmAuthSeed); else { Log.outError(LogFilter.Network, "WorldSocket.HandleAuthSession: Authentication failed for account: {0} ('{1}') address: {2}", account.game.Id, authSession.RealmJoinTicket, address); @@ -567,7 +569,7 @@ namespace Game.Networking // Must be done before WorldSession is created bool wardenActive = WorldConfig.GetBoolValue(WorldCfg.WardenEnabled); - if (wardenActive && account.game.OS != "Win" && account.game.OS != "Wn64" && account.game.OS != "Mc64") + if (wardenActive && account.game.OS != "Win" && account.game.OS != "Wn64" && account.game.OS != "Mc64" && account.game.OS != "MacA") { SendAuthResponseError(BattlenetRpcErrorCode.Denied); Log.outError(LogFilter.Network, "WorldSocket.HandleAuthSession: Client {0} attempted to log in using invalid client OS ({1}).", address, account.game.OS);