From 3470493a6d60243027abd2bb53058a184bcfbe9b Mon Sep 17 00:00:00 2001 From: Roman Trapeznikov Date: Wed, 12 Jul 2023 16:28:31 +0300 Subject: [PATCH 1/3] multipart message fix --- src/ballistica/scene_v1/connection/connection.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ballistica/scene_v1/connection/connection.cc b/src/ballistica/scene_v1/connection/connection.cc index 02e81301..c6a21701 100644 --- a/src/ballistica/scene_v1/connection/connection.cc +++ b/src/ballistica/scene_v1/connection/connection.cc @@ -439,6 +439,10 @@ void Connection::HandleMessagePacket(const std::vector& buffer) { Log(LogLevel::kError, "got invalid BA_MESSAGE_MULTIPART"); } if (buffer[0] == BA_MESSAGE_MULTIPART_END) { + if (multipart_buffer_[0] == BA_MESSAGE_MULTIPART) { + BA_LOG_ONCE(LogLevel::kError, "nested multipart message detected; kicking"); + Error(""); + } HandleMessagePacket(multipart_buffer_); multipart_buffer_.clear(); } From 0a1b889bdf29afa951b9978f0381f9debe7b861f Mon Sep 17 00:00:00 2001 From: Roman Trapeznikov Date: Wed, 12 Jul 2023 16:45:02 +0300 Subject: [PATCH 2/3] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aea056fd..a5c365f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### 1.7.23 (build 21164, api 8, 2023-07-11) +- Network security improvements. ### 1.7.22 (build 21162, api 8, 2023-07-11) From e56b71ffd1c321995274c5669caf2a8f95f18454 Mon Sep 17 00:00:00 2001 From: Roman Trapeznikov Date: Wed, 12 Jul 2023 16:56:14 +0300 Subject: [PATCH 3/3] ci fix --- src/ballistica/scene_v1/connection/connection.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ballistica/scene_v1/connection/connection.cc b/src/ballistica/scene_v1/connection/connection.cc index c6a21701..8ad19be4 100644 --- a/src/ballistica/scene_v1/connection/connection.cc +++ b/src/ballistica/scene_v1/connection/connection.cc @@ -440,7 +440,8 @@ void Connection::HandleMessagePacket(const std::vector& buffer) { } if (buffer[0] == BA_MESSAGE_MULTIPART_END) { if (multipart_buffer_[0] == BA_MESSAGE_MULTIPART) { - BA_LOG_ONCE(LogLevel::kError, "nested multipart message detected; kicking"); + BA_LOG_ONCE(LogLevel::kError, + "nested multipart message detected; kicking"); Error(""); } HandleMessagePacket(multipart_buffer_);