Merge remote-tracking branch 'upstream/master' into develop

This commit is contained in:
EvilFactory
2024-04-16 12:20:09 -03:00
10 changed files with 26 additions and 11 deletions

View File

@@ -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

View File

@@ -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)
{

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>1.3.0.3</Version>
<Version>1.3.0.4</Version>
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -2616,7 +2616,7 @@ namespace Barotrauma
/// <summary>
/// Log the error message, but only if an error with the same identifier hasn't been thrown yet during this session.
/// </summary>
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);

View File

@@ -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
-------------------------------------------------------------------------------------------------------------------------------------------------