mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +00:00
Always require lobby authentication for lobby matches, refs #3549 / 0fd8aa2a77 / D897.
This is due to too many oversteppings of the lobby Terms of Use following JS mods that implemented an UI for players to join lobby games with arbitrary nicknames or 'replace' / impersonate other players in lobby games. Agreed with: user1, Dunedan Code proofread by: Vladislav Minor discussions with: Imarok, Hannibal_Barca, smiley, fpre, bb, nani refs https://wildfiregames.com/forum/index.php?/topic/24722-improving-mod-security/ This was SVN commit r21877.
This commit is contained in:
@@ -26,11 +26,13 @@
|
||||
#include "NetStats.h"
|
||||
|
||||
#include "lib/external_libraries/enet.h"
|
||||
#include "lib/types.h"
|
||||
#include "network/StunClient.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
#include "ps/GUID.h"
|
||||
#include "ps/Profile.h"
|
||||
#include "ps/ThreadUtil.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRuntime.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
@@ -43,6 +45,8 @@
|
||||
#include <miniupnpc/upnperrors.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* Number of peers to allocate for the enet host.
|
||||
* Limited by ENET_PROTOCOL_MAXIMUM_PEER_ID (4096).
|
||||
@@ -1556,7 +1560,8 @@ void CNetServerWorker::SendHolePunchingMessage(const CStr& ipStr, u16 port)
|
||||
|
||||
|
||||
CNetServer::CNetServer(bool useLobbyAuth, int autostartPlayers) :
|
||||
m_Worker(new CNetServerWorker(useLobbyAuth, autostartPlayers))
|
||||
m_Worker(new CNetServerWorker(useLobbyAuth, autostartPlayers)),
|
||||
m_LobbyAuth(useLobbyAuth)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1565,6 +1570,11 @@ CNetServer::~CNetServer()
|
||||
delete m_Worker;
|
||||
}
|
||||
|
||||
bool CNetServer::UseLobbyAuth() const
|
||||
{
|
||||
return m_LobbyAuth;
|
||||
}
|
||||
|
||||
bool CNetServer::SetupConnection(const u16 port)
|
||||
{
|
||||
return m_Worker->SetupConnection(port);
|
||||
|
||||
Reference in New Issue
Block a user