unmojang / drasl

Yggdrasil-compatible API server for Minecraft
GNU General Public License v3.0
118 stars 19 forks source link

Support for UUIDs with dashes in URL #102

Closed Term1t3 closed 3 months ago

Term1t3 commented 3 months ago

Please add support for a different UUID format as used in the official Mojang API. I'll explain:

Mojang supports two of the UUID variants in this example: https://sessionserver.mojang.com/session/minecraft/profile/4566e69f-c907-48ee-8d71-d7ba5aa00d20 https://sessionserver.mojang.com/session/minecraft/profile/4566e69fc90748ee8d71d7ba5aa00d20

Both of these requests are fine for Mojang. Unfortunately, your API implementation (as well as the authlib injector API) doesn't support UUIDs with dashes in this example. In the Drasl logs I see status 400 for this type of request. I have tried both API implementations: drasl.domain.com/authlib-injector/sessionserver/session/minecraft/profile/UUID drasl.domain.com/session/minecraft/profile/UUID

I'm also thinking about possible issues on my side. I'm using NGINX Proxy Manager to handle all my services. Could this be the reason for this issue or is Drasl deliberately designed not to support dashes in UUID?

The reason I ask is because "Bluemap" and also "Bluemap Custom Skin Server" both use URL requests with dashes, without any optional configuration to change this.

evan-goode commented 3 months ago

Thanks, this is valid. Could you review https://github.com/unmojang/drasl/pull/103?

I edited the wiki.vg page to document this: https://wiki.vg/Mojang_API.

Term1t3 commented 3 months ago

Yep, seems good to me. Can you release it to the new version? I'm not a good programmer to build and try it myself in a test environment.

evan-goode commented 3 months ago

Released, may take a second for the OCI container build to finish.