1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
This commit is contained in:
Ivan Savenko 2024-03-29 15:03:42 +02:00
parent 675e7c3110
commit 2a717a6d66

View File

@ -489,7 +489,7 @@ void LobbyServer::receiveSendChatMessage(const NetworkConnectionPtr & connection
std::string channelName = json["channelName"].String(); std::string channelName = json["channelName"].String();
std::string displayName = database->getAccountDisplayName(senderAccountID); std::string displayName = database->getAccountDisplayName(senderAccountID);
if(TextOperations::isValidUnicodeString(messageText)) if(!TextOperations::isValidUnicodeString(messageText))
return sendOperationFailed(connection, "String contains invalid characters!"); return sendOperationFailed(connection, "String contains invalid characters!");
std::string messageTextClean = sanitizeChatMessage(messageText); std::string messageTextClean = sanitizeChatMessage(messageText);