aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.cpp
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2022-03-28 23:48:05 +0200
committerGitHub <noreply@github.com>2022-03-28 23:48:05 +0200
commitb8a7feabea6456f7fa5e8403c8d9bd2630401045 (patch)
treed6fa62ef39eb4fcfac1c1711f49ad86b2b6c59d3 /NorthstarDedicatedTest/masterserver.cpp
parent379cbc8bc251307777a14b901e5617e834398485 (diff)
downloadNorthstarLauncher-b8a7feabea6456f7fa5e8403c8d9bd2630401045.tar.gz
NorthstarLauncher-b8a7feabea6456f7fa5e8403c8d9bd2630401045.zip
More exploit fixes by KIttenPopo (#126)
* Quick fix for a bug I caused * Typo * Update kitten-fixes branch to my repo (#122) * Added string hash macro * Added convenient vtfunc macro * Made lil ConCommand creation macro * Fixed multiple NET_SetConVar exploits * Quick fixerino * Fix convar struct (and other things) * Revive clang-format (but good, i think) * Update .clang-format * Reformatted code to meet .clang-format requirements * Minor formatting fixes * Fixed Northstar "crashing" when console is closed * Update .clang-format * Quick fix for a bug I caused * Typo * NSMem Update * ExplotFixes: Only block excessive convar counts if server * Update ExploitFixes.cpp * Update ExploitFixes.cpp * Updated bytepatch format * reformatted all code for clang-format * Updated my clang-format to v13.0.0 * 3 fixes in 1 - ANTITAMPER fixed - NSMem simplification update - Fixed bad byte string in serverauthentication.cpp * Improved ExploitFixes logging and NET_SetConVar patch * clang-format unironically sabotaged my code * Made ns_exploitfixes_log on by default * Fixed IsMemoryReadable (oops) Co-authored-by: KittenPopo <Pokeberry123@gmail.com>
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.cpp')
-rw-r--r--NorthstarDedicatedTest/masterserver.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp
index 076c0a14..ab6388c3 100644
--- a/NorthstarDedicatedTest/masterserver.cpp
+++ b/NorthstarDedicatedTest/masterserver.cpp
@@ -557,7 +557,7 @@ void MasterServerManager::AuthenticateWithOwnServer(char* uid, char* playerToken
curl_easy_setopt(
curl, CURLOPT_URL,
fmt::format("{}/client/auth_with_self?id={}&playerToken={}", Cvar_ns_masterserver_hostname->GetString(), uidStr, tokenStr)
- .c_str());
+ .c_str());
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteToStringBufferCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
@@ -699,7 +699,7 @@ void MasterServerManager::AuthenticateWithServer(char* uid, char* playerToken, c
fmt::format(
"{}/client/auth_with_server?id={}&playerToken={}&server={}&password={}", Cvar_ns_masterserver_hostname->GetString(),
uidStr, tokenStr, serverIdStr, escapedPassword)
- .c_str());
+ .c_str());
curl_free(escapedPassword);
}
@@ -833,7 +833,7 @@ void MasterServerManager::AddSelfToServerList(
"{}/server/add_server?port={}&authPort={}&name={}&description={}&map={}&playlist={}&maxPlayers={}&password={}",
Cvar_ns_masterserver_hostname->GetString(), port, authPort, nameEscaped, descEscaped, mapEscaped, playlistEscaped,
maxPlayers, passwordEscaped)
- .c_str());
+ .c_str());
curl_free(nameEscaped);
curl_free(descEscaped);
@@ -937,7 +937,7 @@ void MasterServerManager::AddSelfToServerList(
Cvar_ns_player_auth_port->GetInt(), escapedNameNew, escapedDescNew, escapedMapNew,
escapedPlaylistNew, g_ServerAuthenticationManager->m_additionalPlayerData.size(), maxPlayers,
escapedPasswordNew)
- .c_str());
+ .c_str());
curl_free(escapedNameNew);
curl_free(escapedDescNew);
@@ -1038,7 +1038,7 @@ void MasterServerManager::UpdateServerMapAndPlaylist(char* map, char* playlist,
fmt::format(
"{}/server/update_values?id={}&map={}&playlist={}&maxPlayers={}", Cvar_ns_masterserver_hostname->GetString(),
m_ownServerId, mapEscaped, playlistEscaped, maxPlayers)
- .c_str());
+ .c_str());
curl_free(mapEscaped);
curl_free(playlistEscaped);
@@ -1077,7 +1077,7 @@ void MasterServerManager::UpdateServerPlayerCount(int playerCount)
curl, CURLOPT_URL,
fmt::format(
"{}/server/update_values?id={}&playerCount={}", Cvar_ns_masterserver_hostname->GetString(), m_ownServerId, playerCount)
- .c_str());
+ .c_str());
CURLcode result = curl_easy_perform(curl);
@@ -1117,7 +1117,7 @@ void MasterServerManager::WritePlayerPersistentData(char* playerId, char* pdata,
fmt::format(
"{}/accounts/write_persistence?id={}&serverId={}", Cvar_ns_masterserver_hostname->GetString(), strPlayerId,
m_ownServerId)
- .c_str());
+ .c_str());
curl_easy_setopt(curl, CURLOPT_POST, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWriteToStringBufferCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
@@ -1262,7 +1262,7 @@ void CHostState__State_GameShutdownHook(CHostState* hostState)
CHostState__State_GameShutdown(hostState);
}
-MasterServerManager::MasterServerManager() : m_pendingConnectionInfo{}, m_ownServerId{ "" }, m_ownClientAuthToken{ "" } {}
+MasterServerManager::MasterServerManager() : m_pendingConnectionInfo{}, m_ownServerId{""}, m_ownClientAuthToken{""} {}
void InitialiseSharedMasterServer(HMODULE baseAddress)
{