Server validates the cursor positions clients send for a console command before using them!

This commit is contained in:
Joonas Rikkonen
2018-07-20 01:09:55 +03:00
parent f822e77241
commit 9e69216c52
@@ -1983,6 +1983,13 @@ namespace Barotrauma
{
GameMain.Server.SendConsoleMessage("Command \"" + splitCommand[0] + "\" not found.", client);
return;
}
if (!MathUtils.IsValid(cursorWorldPos))
{
GameMain.Server.SendConsoleMessage("Could not execute command \"" + command + "\" - invalid cursor position.", client);
NewMessage(client.Name + " attempted to execute the console command \"" + command + "\" with invalid cursor position.", Color.White);
return;
}
try