Codechange: [Network] Use std::string for the internal handling of admin/rcon passwords

This commit is contained in:
rubidium42
2021-05-02 09:15:12 +02:00
committed by rubidium42
parent 6db52d52d0
commit ebe32ad912
4 changed files with 5 additions and 7 deletions

View File

@@ -664,8 +664,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN(Packet *p)
{
if (this->status != ADMIN_STATUS_INACTIVE) return this->SendError(NETWORK_ERROR_NOT_EXPECTED);
char password[NETWORK_PASSWORD_LENGTH];
p->Recv_string(password, sizeof(password));
std::string password = p->Recv_string(NETWORK_PASSWORD_LENGTH);
if (_settings_client.network.admin_password.empty() ||
_settings_client.network.admin_password.compare(password) != 0) {