Console: don't let random unformatted data end up in the log

This commit is contained in:
SChernykh
2025-06-11 11:40:54 +02:00
parent 09532c901a
commit 26bf2f07a0
2 changed files with 28 additions and 3 deletions
+2 -2
View File
@@ -380,7 +380,7 @@ void ConsoleCommands::process_input(std::string& command, const char* data, uint
command[k] = '\0';
if (check_cookie && ((k <= m_cookie.length()) || (memcmp(command.data(), m_cookie.data(), m_cookie.length()) != 0))) {
LOGWARN(4, "cookie check failed, skipping command " << command);
LOGWARN(4, "cookie check failed, skipping command " << log::MaskNonASCII(command));
}
else {
if (check_cookie) {
@@ -410,7 +410,7 @@ void ConsoleCommands::process_input(std::string& command, const char* data, uint
}
if (!c->name.len) {
LOGWARN(0, "Unknown command " << command.c_str());
LOGWARN(0, "Unknown command " << log::MaskNonASCII(command));
do_help(nullptr, nullptr);
}
}