mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-31 11:17:33 +02:00
Merge branch 'main' into dependabot/maven/org.mariadb.jdbc-mariadb-java-client-3.1.0
This commit is contained in:
@ -233,11 +233,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>*</groupId>
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.geysermc.cumulus</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
<artifactId>*</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
@ -263,6 +259,12 @@
|
|||||||
<artifactId>api</artifactId>
|
<artifactId>api</artifactId>
|
||||||
<version>${geyser.version}</version>
|
<version>${geyser.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Provide premium placeholders-->
|
<!--Provide premium placeholders-->
|
||||||
|
@ -179,7 +179,8 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
private boolean verifyNonce(Player sender, PacketContainer packet,
|
private boolean verifyNonce(Player sender, PacketContainer packet,
|
||||||
ClientPublicKey clientPublicKey, byte[] expectedToken) {
|
ClientPublicKey clientPublicKey, byte[] expectedToken) {
|
||||||
try {
|
try {
|
||||||
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))) {
|
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 0))
|
||||||
|
&& !MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
|
||||||
Either<byte[], ?> either = packet.getSpecificModifier(Either.class).read(0);
|
Either<byte[], ?> either = packet.getSpecificModifier(Either.class).read(0);
|
||||||
if (clientPublicKey == null) {
|
if (clientPublicKey == null) {
|
||||||
Optional<byte[]> left = either.left();
|
Optional<byte[]> left = either.left();
|
||||||
@ -222,10 +223,15 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
plugin.removeSession(player.getAddress());
|
plugin.removeSession(player.getAddress());
|
||||||
|
|
||||||
PacketContainer packet = packetEvent.getPacket();
|
PacketContainer packet = packetEvent.getPacket();
|
||||||
|
Optional<ClientPublicKey> clientKey = Optional.empty();
|
||||||
|
if (MinecraftVersion.atOrAbove(new MinecraftVersion(1, 19, 3))) {
|
||||||
|
// public key sent separate
|
||||||
|
clientKey = Optional.empty();
|
||||||
|
} else {
|
||||||
val profileKey = packet.getOptionals(BukkitConverters.getWrappedPublicKeyDataConverter())
|
val profileKey = packet.getOptionals(BukkitConverters.getWrappedPublicKeyDataConverter())
|
||||||
.optionRead(0);
|
.optionRead(0);
|
||||||
|
|
||||||
val clientKey = profileKey.flatMap(Function.identity()).flatMap(data -> {
|
clientKey = profileKey.flatMap(Function.identity()).flatMap(data -> {
|
||||||
Instant expires = data.getExpireTime();
|
Instant expires = data.getExpireTime();
|
||||||
PublicKey key = data.getKey();
|
PublicKey key = data.getKey();
|
||||||
byte[] signature = data.getSignature();
|
byte[] signature = data.getSignature();
|
||||||
@ -242,6 +248,8 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
plugin.getLog().warn("Invalid public key from player {}", username);
|
plugin.getLog().warn("Invalid public key from player {}", username);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
plugin.getLog().trace("GameProfile {} with {} connecting", sessionKey, username);
|
plugin.getLog().trace("GameProfile {} with {} connecting", sessionKey, username);
|
||||||
|
|
||||||
|
@ -174,11 +174,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>*</groupId>
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.geysermc.cumulus</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
<artifactId>*</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
@ -204,6 +200,12 @@
|
|||||||
<artifactId>api</artifactId>
|
<artifactId>api</artifactId>
|
||||||
<version>${geyser.version}</version>
|
<version>${geyser.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Login plugin-->
|
<!--Login plugin-->
|
||||||
|
14
core/pom.xml
14
core/pom.xml
@ -85,7 +85,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-jdk14</artifactId>
|
<artifactId>slf4j-jdk14</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- snakeyaml is present in Bungee, Spigot, Cauldron, so we could use this independent implementation -->
|
<!-- snakeyaml is present in Bungee, Spigot, Cauldron, so we could use this independent implementation -->
|
||||||
@ -109,11 +109,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>*</groupId>
|
||||||
<artifactId>*</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.geysermc.cumulus</groupId>
|
|
||||||
<artifactId>*</artifactId>
|
<artifactId>*</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
@ -139,6 +135,12 @@
|
|||||||
<artifactId>api</artifactId>
|
<artifactId>api</artifactId>
|
||||||
<version>${geyser.version}</version>
|
<version>${geyser.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--Common component for contacting the Mojang API-->
|
<!--Common component for contacting the Mojang API-->
|
||||||
|
Reference in New Issue
Block a user