summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Protocol/Protocol_1_8.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index 5bf25f347..85765c406 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -365,6 +365,12 @@ void cProtocol_1_8_0::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type
{
ASSERT(m_State == 3); // In game mode?
+ // Prevent chat messages that might trigger CVE-2021-44228
+ if (a_MessageRaw.find("${jndi") != std::string::npos)
+ {
+ return;
+ }
+
// Send the json string to the client:
cPacketizer Pkt(*this, pktChatRaw);
Pkt.WriteString(a_MessageRaw);