Updated Upstream (Waterfall) (#152)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Waterfall Changes:
2c5c954 Additional DoS Mitigations for the login sequence (#603)
b3e5814 Updated Upstream (BungeeCord) (#601)
This commit is contained in:
FivePB (Xer) 2021-01-31 23:22:35 +01:00 committed by GitHub
parent 4323ca94dc
commit bd883ace26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 22 deletions

@ -1 +1 @@
Subproject commit b3e581412f97006061ed33e3069cf0f9cfb460fc
Subproject commit 2c5c9541c95282ad60a68b14d6f2ac40babef64d

View File

@ -1,4 +1,4 @@
From 1b4ffe1cf8b23ba201de65722526f2bca18bb7fd Mon Sep 17 00:00:00 2001
From 645dd7b625e6cda74114262e66edec565f7fda58 Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Tue, 15 Nov 2016 10:31:04 -0500
Subject: [PATCH] 1.7.x Protocol Patch
@ -101,10 +101,10 @@ index 00000000..90064112
+ }
+}
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
index d10cf2ed..09ebe3d8 100644
index 31a95495..93d17f6b 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/DefinedPacket.java
@@ -264,6 +264,11 @@ public abstract class DefinedPacket
@@ -266,6 +266,11 @@ public abstract class DefinedPacket
read( buf );
}
@ -116,7 +116,7 @@ index d10cf2ed..09ebe3d8 100644
public void write(ByteBuf buf)
{
throw new UnsupportedOperationException( "Packet must implement write method" );
@@ -274,6 +279,11 @@ public abstract class DefinedPacket
@@ -276,6 +281,11 @@ public abstract class DefinedPacket
write( buf );
}
@ -129,26 +129,13 @@ index d10cf2ed..09ebe3d8 100644
@Override
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
index 1a647f2b..ec932e92 100644
index ac9f114d..2caadfed 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
@@ -5,10 +5,11 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.DecoderException;
import io.netty.handler.codec.MessageToMessageDecoder;
-import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Setter;
+import java.util.List;
+
@AllArgsConstructor
public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
{
@@ -56,7 +57,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
if ( packet != null )
@@ -57,7 +57,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
{
packetTypeInfo = packet.getClass();
doLengthSanityChecks(in, packet, prot.getDirection(), packetId); // Waterfall: Additional DoS mitigations
- packet.read( in, prot.getDirection(), protocolVersion );
+ packet.read0( in, prot.getDirection(), protocolVersion );
@ -695,7 +682,7 @@ index a29524ca..8d9f4ccb 100644
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionResponse.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionResponse.java
index 388f6cdb..7f124322 100644
index 53575ce0..1a41da75 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionResponse.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/EncryptionResponse.java
@@ -1,5 +1,6 @@