Assume auth url has trailing slash

This commit is contained in:
fullwall 2024-08-20 02:28:48 +08:00
parent 73a5cfdee6
commit 2fcdeec49e
2 changed files with 2 additions and 2 deletions

View File

@ -565,7 +565,7 @@ public class NMSImpl implements NMSBridge {
if (!(sessionService instanceof YggdrasilMinecraftSessionService))
return sessionService.fetchProfile(profile.getId(), requireSecure).profile();
URL url = HttpAuthenticationService
.constantURL(getAuthServerBaseUrl() + "/" + UndashedUuid.toString(profile.getId()));
.constantURL(getAuthServerBaseUrl() + UndashedUuid.toString(profile.getId()));
url = HttpAuthenticationService.concatenateURL(url, "unsigned=" + !requireSecure);
MinecraftClient client = (MinecraftClient) MINECRAFT_CLIENT.invoke(sessionService);
MinecraftProfilePropertiesResponse response = client.get(url, MinecraftProfilePropertiesResponse.class);

View File

@ -544,7 +544,7 @@ public class NMSImpl implements NMSBridge {
if (!(sessionService instanceof YggdrasilMinecraftSessionService))
return sessionService.fetchProfile(profile.getId(), requireSecure).profile();
URL url = HttpAuthenticationService
.constantURL(getAuthServerBaseUrl() + "/" + UndashedUuid.toString(profile.getId()));
.constantURL(getAuthServerBaseUrl() + UndashedUuid.toString(profile.getId()));
url = HttpAuthenticationService.concatenateURL(url, "unsigned=" + !requireSecure);
MinecraftClient client = (MinecraftClient) MINECRAFT_CLIENT.invoke(sessionService);
MinecraftProfilePropertiesResponse response = client.get(url, MinecraftProfilePropertiesResponse.class);