You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#defineMAX_RELAY_PACKET_SIZE (sizeof(RELAY_PACKET_C) + 64 + 46) // 64 bytes for the secret, 46 bytes for the IP address (Even though IPv6 is 39 bytes, we use 46 bytes to be safe)
TC_LOG_ERROR("server.authserver", "[RelayPacket] Relay server secret is not set or is default. Please set a unique secret key with a maximum of 64 characters in the authserver.conf configuration file.");
325
+
_status = STATUS_CLOSED; // Close the connection if the secret is not set
Copy file name to clipboardExpand all lines: src/server/game/Server/Protocol/Opcodes.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1337,7 +1337,8 @@ enum Opcodes : uint16
1337
1337
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT1 = 0x51C,
1338
1338
SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT2 = 0x51D,
1339
1339
SMSG_MULTIPLE_MOVES = 0x51E, // uncompressed version of SMSG_COMPRESSED_MOVES
1340
-
NUM_MSG_TYPES = 0x51F
1340
+
NUM_MSG_TYPES = 0x51F,
1341
+
RELAY_SERVER_CMD_WORLD = 0xA32// Relay packet from relay server to worldserver according to the https://github.com/masterking32/WoW-Server-Relay
TC_LOG_ERROR("network", "WorldSocket::HandleRelayPacket: Relay server secret is not set or is default. Please set a unique secret key with a maximum of 64 characters in the worldserver.conf configuration file.");
466
+
DelayedCloseSocket();
467
+
return;
468
+
}
469
+
470
+
if (relayPacketInfo->SecretKey.empty() || relayPacketInfo->SecretKey != ConfigSecretKey)
471
+
{
472
+
SendAuthResponseError(AUTH_REJECT);
473
+
TC_LOG_ERROR("network", "WorldSocket::HandleRelayPacket: Sent Auth Response (invalid secret key).");
474
+
DelayedCloseSocket();
475
+
return;
476
+
}
477
+
478
+
if(relayPacketInfo->UserIP.empty())
479
+
{
480
+
SendAuthResponseError(AUTH_REJECT);
481
+
TC_LOG_ERROR("network", "WorldSocket::HandleRelayPacket: Sent Auth Response (invalid user IP).");
0 commit comments