v1.3.0.4
This commit is contained in:
+11
-2
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Barotrauma.Extensions;
|
using Barotrauma.Extensions;
|
||||||
using Barotrauma.Steam;
|
using Barotrauma.Steam;
|
||||||
using System;
|
using System;
|
||||||
@@ -152,7 +152,16 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
if (packetHeader.IsConnectionInitializationStep())
|
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
|
if (initialization == ConnectionInitialization.AuthInfoAndVersion
|
||||||
&& remotePeer.AuthStatus == RemotePeer.AuthenticationStatus.NotAuthenticated)
|
&& remotePeer.AuthStatus == RemotePeer.AuthenticationStatus.NotAuthenticated)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma</Product>
|
<Product>Barotrauma</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>Barotrauma</AssemblyName>
|
<AssemblyName>Barotrauma</AssemblyName>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<RootNamespace>Barotrauma</RootNamespace>
|
<RootNamespace>Barotrauma</RootNamespace>
|
||||||
<Authors>FakeFish, Undertow Games</Authors>
|
<Authors>FakeFish, Undertow Games</Authors>
|
||||||
<Product>Barotrauma Dedicated Server</Product>
|
<Product>Barotrauma Dedicated Server</Product>
|
||||||
<Version>1.3.0.3</Version>
|
<Version>1.3.0.4</Version>
|
||||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||||
<Platforms>AnyCPU;x64</Platforms>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
<AssemblyName>DedicatedServer</AssemblyName>
|
<AssemblyName>DedicatedServer</AssemblyName>
|
||||||
|
|||||||
@@ -2615,7 +2615,7 @@ namespace Barotrauma
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Log the error message, but only if an error with the same identifier hasn't been thrown yet during this session.
|
/// Log the error message, but only if an error with the same identifier hasn't been thrown yet during this session.
|
||||||
/// </summary>
|
/// </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; }
|
if (loggedErrorIdentifiers.Contains(identifier)) { return; }
|
||||||
ThrowError(errorMsg, e);
|
ThrowError(errorMsg, e);
|
||||||
|
|||||||
@@ -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
|
v1.3.0.3
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user