mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Net Server: Verify password in Authenticate
Follows 1a8de6d2b8.
Validate the password when a client joins a game, so even a player that
knows the connection data cannot join.
Refs #3556, Refs #5913
Differential Revision: https://code.wildfiregames.com/D3438
This was SVN commit r24775.
This commit is contained in:
@@ -175,6 +175,11 @@ void CNetClient::SetHostingPlayerName(const CStr& hostingPlayerName)
|
||||
m_HostingPlayerName = hostingPlayerName;
|
||||
}
|
||||
|
||||
void CNetClient::SetGamePassword(const CStr& hashedPassword)
|
||||
{
|
||||
m_Password = hashedPassword;
|
||||
}
|
||||
|
||||
bool CNetClient::SetupConnection(ENetHost* enetClient)
|
||||
{
|
||||
CNetClientSession* session = new CNetClientSession(*this);
|
||||
@@ -570,7 +575,7 @@ void CNetClient::SendAuthenticateMessage()
|
||||
{
|
||||
CAuthenticateMessage authenticate;
|
||||
authenticate.m_Name = m_UserName;
|
||||
authenticate.m_Password = L""; // TODO
|
||||
authenticate.m_Password = m_Password;
|
||||
authenticate.m_IsLocalClient = m_IsLocalClient;
|
||||
SendMessage(&authenticate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user