diff --git a/.github/DISCUSSION_TEMPLATE/bug-reports.yml b/.github/DISCUSSION_TEMPLATE/bug-reports.yml
index 7f8dfb6e5..3a3c429d1 100644
--- a/.github/DISCUSSION_TEMPLATE/bug-reports.yml
+++ b/.github/DISCUSSION_TEMPLATE/bug-reports.yml
@@ -73,8 +73,8 @@ body:
label: Version
description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu.
options:
- - v1.3.0.3
- - v1.4.0.0 (unstable)
+ - v1.3.0.4
+ - v1.4.3.0 (unstable)
- Other
validations:
required: true
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Networking/Primitives/Peers/P2POwnerPeer.cs b/Barotrauma/BarotraumaClient/ClientSource/Networking/Primitives/Peers/P2POwnerPeer.cs
index 537345b0c..f9b0d0081 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Networking/Primitives/Peers/P2POwnerPeer.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Networking/Primitives/Peers/P2POwnerPeer.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
using Barotrauma.Extensions;
using Barotrauma.Steam;
using System;
@@ -152,7 +152,16 @@ namespace Barotrauma.Networking
if (packetHeader.IsConnectionInitializationStep())
{
- ConnectionInitialization initialization = peerPacketHeaders.Initialization ?? throw new Exception("Initialization step missing");
+ if (peerPacketHeaders.Initialization == null)
+ {
+ //can happen if the packet is crafted in a way to leave the Initialization value as null
+ DebugConsole.ThrowErrorOnce(
+ $"P2POwnerPeer.OnP2PData:{remotePeer.Endpoint.StringRepresentation}",
+ $"Failed to initialize remote peer {remotePeer.Endpoint.StringRepresentation}: initialization step missing.");
+ CommunicateDisconnectToRemotePeer(remotePeer, PeerDisconnectPacket.WithReason(DisconnectReason.MalformedData));
+ return;
+ }
+ ConnectionInitialization initialization = peerPacketHeaders.Initialization.Value;
if (initialization == ConnectionInitialization.AuthInfoAndVersion
&& remotePeer.AuthStatus == RemotePeer.AuthenticationStatus.NotAuthenticated)
{
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 5bfa863a1..bc6057d8b 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 6891d1311..6fbbca0c5 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index 7ba7dd5f6..c0ab50d09 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index 89c192043..65273750f 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index efed825f5..f162a12e0 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index 6f843afd8..ce5342530 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 1.3.0.3
+ 1.3.0.4
Copyright © FakeFish 2018-2023
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs b/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
index 98628512c..062bd0a4c 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
@@ -2616,7 +2616,7 @@ namespace Barotrauma
///
/// Log the error message, but only if an error with the same identifier hasn't been thrown yet during this session.
///
- public static void ThrowErrorOnce(string identifier, string errorMsg, Exception e)
+ public static void ThrowErrorOnce(string identifier, string errorMsg, Exception e = null)
{
if (loggedErrorIdentifiers.Contains(identifier)) { return; }
ThrowError(errorMsg, e);
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index 9b3a8ee2f..3178f482c 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------------------------------------------------------------------------------------
+v1.3.0.4
+-------------------------------------------------------------------------------------------------------------------------------------------------
+
+- Fixed another exploit that allowed crashing servers by sending them specifically crafted malformed data.
+
-------------------------------------------------------------------------------------------------------------------------------------------------
v1.3.0.3
-------------------------------------------------------------------------------------------------------------------------------------------------