Waterfall/BungeeCord-Patches/0063-Improve-login-state-transition.patch
Shane Freeder 097888c72a
Updated Upstream (BungeeCord)
Upstream has released updates that appear 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:
78ca16df Minecraft 1.19.1 support
adc32d5a #3367: Add linux aarch64 native epoll support
12e45148 #3355,#3357: Fix possible NPE's in LoginEvent & PreLoginEvent
2022-07-27 19:35:10 +01:00

31 lines
1.4 KiB
Diff

From 3f69c973c1887a0c1ee3763dd62460ded540dd54 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 8 May 2022 12:04:30 +0100
Subject: [PATCH] Improve login state transition
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
index 4a8cb3df..6011078f 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
@@ -472,6 +472,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" );
Preconditions.checkState( EncryptionUtil.check( loginRequest.getPublicKey(), encryptResponse, request ), "Invalid verification" );
+ thisState = State.FINISHING; // Waterfall - move earlier - There is no verification of this later (and this is not API)
SecretKey sharedKey = EncryptionUtil.getSecret( encryptResponse, request );
// Waterfall start
@@ -526,7 +527,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
}
};
- thisState = State.FINISHING;
+ //thisState = State.FINISHING; // Waterfall - move earlier
HttpClient.get( authURL, ch.getHandle().eventLoop(), handler );
}
--
2.37.1