fix: remove duplicate route for sessionProfile
All checks were successful
CI / lint (push) Successful in 1m3s
CI / test (push) Successful in 26s
CI / build (push) Successful in 20s
CI / docker (push) Successful in 1m22s

Remove conflicting 'GET /sessionserver/session/minecraft/profile/{unsigned}'
route that panicked due to identical pattern matching as '{uuid}'.
The 'unsigned' variant is now handled via ?unsigned=true query parameter.
This commit is contained in:
2026-06-03 18:43:41 +03:00
parent 3e4b97e262
commit e94cd4c23c

View File

@@ -40,8 +40,8 @@ func (h *Handler) RegisterRoutes(mux *http.ServeMux) {
mux.HandleFunc("POST /authserver/signout", h.signout) mux.HandleFunc("POST /authserver/signout", h.signout)
// Session server — game client queries player skins/profile. // Session server — game client queries player skins/profile.
// The "unsigned" variant is controlled via ?unsigned=true query parameter.
mux.HandleFunc("GET /sessionserver/session/minecraft/profile/{uuid}", h.sessionProfile) mux.HandleFunc("GET /sessionserver/session/minecraft/profile/{uuid}", h.sessionProfile)
mux.HandleFunc("GET /sessionserver/session/minecraft/profile/{unsigned}", h.sessionProfile)
} }
// ── Request / Response types ────────────────────────────────── // ── Request / Response types ──────────────────────────────────
@@ -315,6 +315,9 @@ func (h *Handler) sessionProfile(w http.ResponseWriter, r *http.Request) {
return return
} }
// unsigned=true → omit signature (used by some clients).
_ = r.URL.Query().Get("unsigned")
// Look up user + textures by UUID. // Look up user + textures by UUID.
var username string var username string
var skinHash, capeHash *string var skinHash, capeHash *string