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:
wraitii
2021-01-23 18:04:36 +00:00
parent 498f5eb083
commit 4cc824d620
8 changed files with 68 additions and 8 deletions
+10
View File
@@ -99,6 +99,11 @@ public:
*/
void SetHostingPlayerName(const CStr& hostingPlayerName);
/**
* Set the game password.
*/
void SetGamePassword(const CStr& hashedPassword);
/**
* Returns the GUID of the local client.
* Used for distinguishing observers.
@@ -293,6 +298,11 @@ private:
u16 m_ServerPort;
bool m_UseSTUN;
/**
* Password to join the game.
*/
CStr m_Password;
/// Current network session (or NULL if not connected)
CNetClientSession* m_Session;