mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 03:44:00 +02:00
- to appease the security freaks, ONLY clients that are ALREADY connected in the lobby are able to connect to the built in FTP server now
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "types.h"
|
||||
#include "socket.h"
|
||||
|
||||
#include "leak_dumper.h"
|
||||
|
||||
@@ -34,16 +35,18 @@ protected:
|
||||
std::pair<string,string> tilesetsPath;
|
||||
int portNumber;
|
||||
int maxPlayers;
|
||||
static FTPClientValidationInterface *ftpValidationIntf;
|
||||
|
||||
public:
|
||||
|
||||
FTPServerThread(std::pair<string,string> mapsPath, std::pair<string,string> tilesetsPath, int portNumber,int maxPlayers);
|
||||
FTPServerThread(std::pair<string,string> mapsPath, std::pair<string,string> tilesetsPath, int portNumber,int maxPlayers, FTPClientValidationInterface *ftpValidationIntf);
|
||||
~FTPServerThread();
|
||||
virtual void execute();
|
||||
virtual void signalQuit();
|
||||
virtual bool shutdownAndWait();
|
||||
|
||||
static void addClientToServerIPAddress(uint32 clientIp,uint32 ServerIp);
|
||||
static FTPClientValidationInterface * getFtpValidationIntf() { return ftpValidationIntf; }
|
||||
|
||||
};
|
||||
|
||||
|
@@ -48,7 +48,13 @@ using std::string;
|
||||
|
||||
using namespace Shared::PlatformCommon;
|
||||
|
||||
namespace Shared{ namespace Platform {
|
||||
namespace Shared { namespace Platform {
|
||||
|
||||
// The callback Interface used by the UPNP discovery process
|
||||
class FTPClientValidationInterface {
|
||||
public:
|
||||
virtual int isValidClientType(uint32 clientIp) = 0;
|
||||
};
|
||||
|
||||
|
||||
// The callback Interface used by the UPNP discovery process
|
||||
|
Reference in New Issue
Block a user