13
0
geforkt von Mirrors/Velocity

Fix decoding of unsigned messages on 1.19.1 (#814)

Dieser Commit ist enthalten in:
JNNGL 2022-08-04 02:20:25 +11:00 committet von GitHub
Ursprung 8344082b1a
Commit 62bd58d356
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -99,7 +99,8 @@ public class PlayerChat implements MinecraftPacket {
salt = Longs.toByteArray(saltLong); salt = Longs.toByteArray(saltLong);
signature = signatureBytes; signature = signatureBytes;
expiry = Instant.ofEpochMilli(expiresAt); 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; unsigned = true;
} else { } else {
throw EncryptionUtils.INVALID_SIGNATURE; throw EncryptionUtils.INVALID_SIGNATURE;