2022-08-20 18:43:03 +02:00
|
|
|
From 34ac95f94206ae5c449a1bb6fffca5dfa16b1256 Mon Sep 17 00:00:00 2001
|
2022-05-08 13:04:46 +02:00
|
|
|
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
|
2022-07-27 20:35:10 +02:00
|
|
|
index 4a8cb3df..6011078f 100644
|
2022-05-08 13:04:46 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
2022-07-27 20:35:10 +02:00
|
|
|
@@ -472,6 +472,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
2022-05-08 13:04:46 +02:00
|
|
|
{
|
|
|
|
Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" );
|
2022-06-07 19:12:20 +02:00
|
|
|
Preconditions.checkState( EncryptionUtil.check( loginRequest.getPublicKey(), encryptResponse, request ), "Invalid verification" );
|
2022-05-08 13:04:46 +02:00
|
|
|
+ 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
|
2022-07-27 20:35:10 +02:00
|
|
|
@@ -526,7 +527,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
2022-05-08 13:04:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
- thisState = State.FINISHING;
|
|
|
|
+ //thisState = State.FINISHING; // Waterfall - move earlier
|
|
|
|
HttpClient.get( authURL, ch.getHandle().eventLoop(), handler );
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2022-08-20 18:43:03 +02:00
|
|
|
2.37.2
|
2022-05-08 13:04:46 +02:00
|
|
|
|