Mojira Archive
MC-249893

Authlib: MinecraftSessionService#fillProfileProperties doesn't check if server returns an error

When sending a request to session server with invalid UUID, it would return a JSON object with error messages, e.g. https://sessionserver.mojang.com/session/minecraft/profile/0000000000000000000901fcec0bde59

{
  "path": "/session/minecraft/profile/0000000000000000000901fcec0bde59",
  "errorMessage": "Not a valid UUID: 0000000000000000000901fcec0bde59",
  "developerMessage": "Not a valid UUID: 0000000000000000000901fcec0bde59"
}

This makes calling

Minecraft.getInstance().getMinecraftSessionService().fillProfileProperties(new GameProfile(uuid, null), true);

crashes the game because it return a GameProfile with both uuid and name null.

Background

I make a mod that shows the owner of a pet if you look at it, it works fine for vanilla server, but when it used in a Geyser server, it would use a different UUID format for bedrock player, making this issue happen.

Fixed

deirn

2022-04-05, 04:55 AM

2023-09-20, 12:32 PM

2023-09-20, 12:32 PM

2

3

Plausible

Normal

Platform

Networking

1.18.2

23w31a