[Proto] Update source file (#535)

This commit is contained in:
Edo 2022-10-20 15:06:29 +01:00 committed by GitHub
parent 0dbb2c8706
commit 29e6d2afff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ namespace Components
const auto signedMsg = Utils::Cryptography::ECC::SignMessage(key, data); const auto signedMsg = Utils::Cryptography::ECC::SignMessage(key, data);
Proto::RCon::Command rconExec; Proto::RCon::Command rconExec;
rconExec.set_commands(RconContainer.command); rconExec.set_command(RconContainer.command);
rconExec.set_signature(signedMsg); rconExec.set_signature(signedMsg);
Network::SendCommand(address, "rconExecute", rconExec.SerializeAsString()); Network::SendCommand(address, "rconExecute", rconExec.SerializeAsString());
@ -199,10 +199,10 @@ namespace Components
RconContainer.timestamp = 0; RconContainer.timestamp = 0;
Proto::RCon::Command command; Proto::RCon::Command rconExec;
command.ParseFromString(data); rconExec.ParseFromString(data);
if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, command.signature())) if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, rconExec.signature()))
{ {
return; return;
} }
@ -213,7 +213,7 @@ namespace Components
RconContainer.output.append(output); RconContainer.output.append(output);
}); });
Command::Execute(command.commands(), true); Command::Execute(rconExec.command(), true);
Logger::PipeOutput(nullptr); Logger::PipeOutput(nullptr);

View File

@ -4,6 +4,6 @@ package Proto.RCon;
message Command message Command
{ {
bytes commands = 1; bytes command = 1;
bytes signature = 2; bytes signature = 2;
} }