Skip to content

Commit 18545a7

Browse files
committed
refactor(security): remove redundant comments and debug logs
1 parent 7ec0ac6 commit 18545a7

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

Generals/Code/GameEngine/Source/GameNetwork/ConnectionManager.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@
5353
#include "GameClient/DisconnectMenu.h"
5454
#include "GameClient/InGameUI.h"
5555

56-
//============================================================================
57-
// hasValidTransferFileExtension
58-
//============================================================================
59-
// TheSuperHackers @security bobtista 06/11/2025
60-
// Validates file extensions for map transfer operations to prevent arbitrary
61-
// file types from being transferred over the network or loaded from save games.
62-
//============================================================================
6356
static Bool hasValidTransferFileExtension(const AsciiString& filePath)
6457
{
6558
static const char* const validExtensions[] = {
@@ -75,7 +68,6 @@ static Bool hasValidTransferFileExtension(const AsciiString& filePath)
7568

7669
if (fileExt == NULL || fileExt[1] == '\0')
7770
{
78-
DEBUG_LOG(("File path '%s' has no extension.", filePath.str()));
7971
return false;
8072
}
8173

@@ -89,7 +81,6 @@ static Bool hasValidTransferFileExtension(const AsciiString& filePath)
8981
}
9082
}
9183

92-
DEBUG_LOG(("File path '%s' has invalid extension '%s' for transfer operations.", filePath.str(), fileExt));
9384
return false;
9485
}
9586

GeneralsMD/Code/GameEngine/Source/GameNetwork/ConnectionManager.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@
5353
#include "GameClient/DisconnectMenu.h"
5454
#include "GameClient/InGameUI.h"
5555

56-
//============================================================================
57-
// hasValidTransferFileExtension
58-
//============================================================================
59-
// TheSuperHackers @security bobtista 06/11/2025
60-
// Validates file extensions for map transfer operations to prevent arbitrary
61-
// file types from being transferred over the network or loaded from save games.
62-
//============================================================================
6356
static Bool hasValidTransferFileExtension(const AsciiString& filePath)
6457
{
6558
static const char* const validExtensions[] = {
@@ -75,7 +68,6 @@ static Bool hasValidTransferFileExtension(const AsciiString& filePath)
7568

7669
if (fileExt == NULL || fileExt[1] == '\0')
7770
{
78-
DEBUG_LOG(("File path '%s' has no extension.", filePath.str()));
7971
return false;
8072
}
8173

@@ -89,7 +81,6 @@ static Bool hasValidTransferFileExtension(const AsciiString& filePath)
8981
}
9082
}
9183

92-
DEBUG_LOG(("File path '%s' has invalid extension '%s' for transfer operations.", filePath.str(), fileExt));
9384
return false;
9485
}
9586

0 commit comments

Comments
 (0)