Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-09-08 20:43:04 +02:00
Remove IPv6 scope if present
Dieser Commit ist enthalten in:
Ursprung
f682cf1326
Commit
5ce2c113ae
@ -796,6 +796,13 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
|||||||
FloodgateSkinUploader skinUploader = geyser.getSkinUploader();
|
FloodgateSkinUploader skinUploader = geyser.getSkinUploader();
|
||||||
FloodgateCipher cipher = geyser.getCipher();
|
FloodgateCipher cipher = geyser.getCipher();
|
||||||
|
|
||||||
|
String bedrockAddress = upstream.getAddress().getAddress().getHostAddress();
|
||||||
|
// both BungeeCord and Velocity remove the IPv6 scope (if there is one) for Spigot
|
||||||
|
int ipv6ScopeIndex = bedrockAddress.indexOf('%');
|
||||||
|
if (ipv6ScopeIndex != -1) {
|
||||||
|
bedrockAddress = bedrockAddress.substring(0, ipv6ScopeIndex);
|
||||||
|
}
|
||||||
|
|
||||||
encryptedData = cipher.encryptFromString(BedrockData.of(
|
encryptedData = cipher.encryptFromString(BedrockData.of(
|
||||||
clientData.getGameVersion(),
|
clientData.getGameVersion(),
|
||||||
authData.name(),
|
authData.name(),
|
||||||
@ -804,7 +811,7 @@ public class GeyserSession implements GeyserConnection, CommandSender {
|
|||||||
clientData.getLanguageCode(),
|
clientData.getLanguageCode(),
|
||||||
clientData.getUiProfile().ordinal(),
|
clientData.getUiProfile().ordinal(),
|
||||||
clientData.getCurrentInputMode().ordinal(),
|
clientData.getCurrentInputMode().ordinal(),
|
||||||
upstream.getAddress().getAddress().getHostAddress(),
|
bedrockAddress,
|
||||||
skinUploader.getId(),
|
skinUploader.getId(),
|
||||||
skinUploader.getVerifyCode()
|
skinUploader.getVerifyCode()
|
||||||
).toString());
|
).toString());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren