Added flood protection for the HandleKeyResponse in the authentication server
diff --git a/src/engine/server/serverMain.cpp b/src/engine/server/serverMain.cpp
index 9df8129..39049b7 100644
--- a/src/engine/server/serverMain.cpp
+++ b/src/engine/server/serverMain.cpp
@@ -1234,7 +1234,7 @@ void idServerMainSystemLocal::RemoteCommand( netadr_t from, msg_t* msg )
{
cmd_aux++;
}
-
+
while( cmd_aux[0] == ' ' )
{
cmd_aux++;
diff --git a/src/tools/authserver/messages.cpp b/src/tools/authserver/messages.cpp
index 0345c5e..8a24913 100644
--- a/src/tools/authserver/messages.cpp
+++ b/src/tools/authserver/messages.cpp
@@ -963,6 +963,12 @@ static void HandleKeyResponse( const char* msg, const struct sockaddr_storage* a
char* token[64] = { 0 };
unsigned int index = 0;
+ // Flood protection
+ if( Cl_BlockedByThrottle( addr, addrlen ) )
+ {
+ return;
+ }
+
// Break message so packets can be tested
strncpy( str, msg, sizeof( str ) );
token[index] = strtok( str, " " );
GitHub
sha: 405ce4be