aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0857-Treat-sequence-violations-like-they-should-be.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0857-Treat-sequence-violations-like-they-should-be.patch')
-rw-r--r--patches/server/0857-Treat-sequence-violations-like-they-should-be.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0857-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0857-Treat-sequence-violations-like-they-should-be.patch
new file mode 100644
index 0000000000..360f303ea0
--- /dev/null
+++ b/patches/server/0857-Treat-sequence-violations-like-they-should-be.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Thu, 30 Mar 2023 03:13:58 +0100
+Subject: [PATCH] Treat sequence violations like they should be
+
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index 006c1fa70bd38a3db9844a77f3f5d22b0d083ddf..2e12d2f22485644bc2fc3d5235cfd3bc755f6c72 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -1964,6 +1964,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+
+ public void ackBlockChangesUpTo(int sequence) {
+ if (sequence < 0) {
++ this.disconnect("Expected packet sequence nr >= 0", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - Treat sequence violations like they should be
+ throw new IllegalArgumentException("Expected packet sequence nr >= 0");
+ } else {
+ this.ackBlockChangesUpTo = Math.max(sequence, this.ackBlockChangesUpTo);