From 62bd58d356e9fd2b1f5ee25752ebdd455362798b Mon Sep 17 00:00:00 2001 From: JNNGL <45935949+JNNGL@users.noreply.github.com> Date: Thu, 4 Aug 2022 02:20:25 +1100 Subject: [PATCH] Fix decoding of unsigned messages on 1.19.1 (#814) --- .../velocitypowered/proxy/protocol/packet/chat/PlayerChat.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/chat/PlayerChat.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/chat/PlayerChat.java index 212f9cf80..9c675b513 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/chat/PlayerChat.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/chat/PlayerChat.java @@ -99,7 +99,8 @@ public class PlayerChat implements MinecraftPacket { salt = Longs.toByteArray(saltLong); signature = signatureBytes; expiry = Instant.ofEpochMilli(expiresAt); - } else if (saltLong == 0L && signatureBytes.length == 0) { + } else if ((protocolVersion.compareTo(ProtocolVersion.MINECRAFT_1_19_1) >= 0 + || saltLong == 0L) && signatureBytes.length == 0) { unsigned = true; } else { throw EncryptionUtils.INVALID_SIGNATURE;