31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
From 91ba8610d491e730d73485443773c8a24024a4d0 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 864cb119..6344462c 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
|
|
@@ -512,6 +512,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
|
|
@@ -566,7 +567,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.44.0
|
|
|