Skip to content

Commit

Permalink
tweak: admin password used bool
Browse files Browse the repository at this point in the history
  • Loading branch information
ToeKneeRED committed Aug 21, 2024
1 parent 4563e3e commit 5184f3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Code/server/GameServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,12 @@ void GameServer::HandleAuthenticationRequest(const ConnectionId_t aConnectionId,
return;
}

bool adminPasswordUsed = acRequest->Token == sAdminPassword.value() && !sAdminPassword.empty();

// check if the proper server password was supplied.
if (acRequest->Token == sPassword.value() || (acRequest->Token == sAdminPassword.value() && !sAdminPassword.empty()))
if (acRequest->Token == sPassword.value() || adminPasswordUsed)
{
if (acRequest->Token == sAdminPassword.value() && !sAdminPassword.empty())
if (adminPasswordUsed)
{
m_adminSessions.insert(aConnectionId);
spdlog::warn("New admin session for {:x} '{}'", aConnectionId, remoteAddress);
Expand Down

0 comments on commit 5184f3b

Please sign in to comment.