Updated Upstream (BungeeCord)

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

BungeeCord Changes:
c96628b7 #3094: Fix TO_CLIENT max Chat string length
e5ded9a2 Apply stricter length limits to client strings
This commit is contained in:
Shane Freeder 2021-05-21 09:04:26 +01:00
parent f7c7b4820c
commit 5d64a21724
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
9 changed files with 27 additions and 46 deletions

@ -1 +1 @@
Subproject commit 5823f47467cc1ad981adbcec30c3db0200ee2409
Subproject commit c96628b72e2cfa46ba12a76a1262c00085fbe99f

View File

@ -1,4 +1,4 @@
From 4de2289a69e998b32e548dc57e4819cd138e1611 Mon Sep 17 00:00:00 2001
From fb684fc6e09c86d84c6b6047901ad3f6b447fd41 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 20 Mar 2019 21:39:12 -0700
Subject: [PATCH] Use proper max length for serverbound chat packet
@ -30,22 +30,25 @@ index 0cef9430..d51a3142 100644
{
if ( b.length > Short.MAX_VALUE )
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java
index 7a0a1ce7..828a5dbe 100644
index f886fe6e..c387802d 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Chat.java
@@ -40,6 +40,11 @@ public class Chat extends DefinedPacket
@@ -40,7 +40,13 @@ public class Chat extends DefinedPacket
@Override
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
- message = readString( buf, ( direction == ProtocolConstants.Direction.TO_CLIENT ) ? Short.MAX_VALUE : 256 );
+ // Waterfall start
+ if (direction == ProtocolConstants.Direction.TO_CLIENT) {
+ this.message = readString(buf, Short.MAX_VALUE * 8 + 8);
+ } else
+ } else {
+ message = readString( buf, 256 );
+ }
+ // Waterfall end
message = readString( buf );
if ( direction == ProtocolConstants.Direction.TO_CLIENT )
{
@@ -54,6 +59,11 @@ public class Chat extends DefinedPacket
position = buf.readByte();
@@ -54,6 +60,11 @@ public class Chat extends DefinedPacket
@Override
public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
@ -58,5 +61,5 @@ index 7a0a1ce7..828a5dbe 100644
if ( direction == ProtocolConstants.Direction.TO_CLIENT )
{
--
2.30.0
2.31.1

View File

@ -1,22 +0,0 @@
From e668f69d4329b3fbdf1d4a088c42edb48b898e57 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 9 May 2020 21:40:23 -0400
Subject: [PATCH] Cap tab complete packets to servers max
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteRequest.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteRequest.java
index d6865ae2..3e4ea192 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteRequest.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteRequest.java
@@ -41,7 +41,7 @@ public class TabCompleteRequest extends DefinedPacket
{
transactionId = readVarInt( buf );
}
- cursor = readString( buf );
+ cursor = readString( buf , 32500); // Waterfall
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 )
{
--
2.28.0

View File

@ -1,4 +1,4 @@
From 2376fd17ecc830b3d19db344e3c03156939a0bae Mon Sep 17 00:00:00 2001
From 554f71e17dab9a0e129d9bb813369e406fcebd54 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 20 Jun 2020 18:21:17 +0100
Subject: [PATCH] Remove version from brand info
@ -18,5 +18,5 @@ index f4494898..9e180c30 100644
brand.release();
// changes in the packet are ignored so we need to send it manually
--
2.28.0
2.31.1

View File

@ -1,4 +1,4 @@
From 277da892c1e5b98479332162adfa981d0bcb3eb2 Mon Sep 17 00:00:00 2001
From e27d12545aaf1ee62f66d796cbc4f4acd9552482 Mon Sep 17 00:00:00 2001
From: theminecoder <theminecoder.dev@gmail.com>
Date: Sun, 19 Jul 2020 10:18:23 +1000
Subject: [PATCH] Add auth url option
@ -27,5 +27,5 @@ index 4b22b232..b7ecd828 100644
Callback<String> handler = new Callback<String>()
{
--
2.29.2
2.31.1

View File

@ -1,4 +1,4 @@
From 571479857c831423a4e20e11e86913719e969a19 Mon Sep 17 00:00:00 2001
From a0a1f3d00766fd291d68a8ce93bac5f331263c97 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 15 Sep 2020 18:11:49 +0100
Subject: [PATCH] Add the ability to generate decoder traces for debugging
@ -40,5 +40,5 @@ index 2583aa2c..334d5054 100644
}
}
--
2.28.0
2.31.1

View File

@ -1,4 +1,4 @@
From 0fd0bf29d77463349c44fc92f9ccdcae63af89db Mon Sep 17 00:00:00 2001
From 27dd755c7d2ca99b302ae28b61a9e4a00823130e Mon Sep 17 00:00:00 2001
From: "Five (Xer)" <admin@fivepb.me>
Date: Sat, 30 Jan 2021 18:04:14 +0100
Subject: [PATCH] Additional DoS mitigations
@ -50,7 +50,7 @@ index d10cf2ed..31a95495 100644
+ // Waterfall end
}
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..ac9f114d 100644
index 37d28c01..01d35f41 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
@@ -3,7 +3,7 @@ package net.md_5.bungee.protocol;
@ -166,10 +166,10 @@ index 388f6cdb..53575ce0 100644
+ // Waterfall end
}
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/LoginRequest.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/LoginRequest.java
index a691f962..a4c0a6a5 100644
index 08ee376e..cfd8e64e 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/LoginRequest.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/LoginRequest.java
@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
@@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.md_5.bungee.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.DefinedPacket;
@ -177,7 +177,7 @@ index a691f962..a4c0a6a5 100644
@Data
@NoArgsConstructor
@@ -38,4 +39,12 @@ public class LoginRequest extends DefinedPacket
@@ -34,4 +35,12 @@ public class LoginRequest extends DefinedPacket
{
handler.handle( this );
}
@ -241,5 +241,5 @@ index 738f0c92..ec33d337 100644
+ // Waterfall end
}
--
2.30.0
2.31.1

View File

@ -1,4 +1,4 @@
From f3589d89f522ed91d30330e62026dc1f7578e273 Mon Sep 17 00:00:00 2001
From 56382997d3154a999688ff36d31038a0e77ff7b3 Mon Sep 17 00:00:00 2001
From: Josh Roy <10731363+JRoy@users.noreply.github.com>
Date: Sun, 21 Feb 2021 23:52:11 -0500
Subject: [PATCH] Add support for hex color codes in console
@ -242,5 +242,5 @@ index 00000000..5d1a6126
+}
+
--
2.25.1
2.31.1

View File

@ -1,4 +1,4 @@
From e12bc246dfc8d052e40895e3d6bf31d4fba2660d Mon Sep 17 00:00:00 2001
From a1ae8aaff1a3e357072baf7115d1eadbc9c148a5 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me>
Date: Sat, 24 Apr 2021 17:52:33 +0100
Subject: [PATCH] Set Netty pooled buffer size to 4MB
@ -29,5 +29,5 @@ index 0db3d76a..35680528 100644
parser.allowsUnrecognizedOptions();
parser.acceptsAll( Arrays.asList( "help" ), "Show the help" );
--
2.31.1.windows.1
2.31.1