mojira.dev
WEB-5727

API /profiles/minecraft returns result for specific old username

The API endpoint /profiles/minecraft with a list of usernames erroneously returns results for an old username which is not used by the player anymore. The name is zemstaofficiar. For most other usernames the API does not behave this way and simply does not have results for the old usernames. It is also inconsistent with the behavior of the other API endpoints.

$ curl -X POST https://api.mojang.com/profiles/minecraft --data '["zoro_mc","zemstaofficiar"]' -H "Content-Type: application/json"
[{"id":"825b8307bf8348f0ae3cc74722899bb7","name":"zoro_mc"},{"id":"825b8307bf8348f0ae3cc74722899bb7","name":"zemstaofficiar"}]
$ curl https://sessionserver.mojang.com/session/minecraft/profile/825b8307bf8348f0ae3cc74722899bb7
{
  "id" : "825b8307bf8348f0ae3cc74722899bb7",
  "name" : "zoro_mc",
  "properties" : [ {
    "name" : "textures",
    "value" : "ewogICJ0aW1lc3RhbXAiIDogMTY1MDgyMjI0NzI5MSwKICAicHJvZmlsZUlkIiA6ICI4MjViODMwN2JmODM0OGYwYWUzY2M3NDcyMjg5OWJiNyIsCiAgInByb2ZpbGVOYW1lIiA6ICJ6b3JvX21jIiwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzg0MzQyN2Y4YmYzNjBlZjg3NjBiNjM0NDQ3Y2VjZWQ2MDk4MjgyOTZmYWQzYWVkZmMwNTAyODllNTkzNWQwMDkiCiAgICB9CiAgfQp9"
  } ]
}
$ curl https://api.mojang.com/user/profiles/825b8307bf8348f0ae3cc74722899bb7/names | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   225  100   225    0     0    363      0 --:--:-- --:--:-- --:--:--   363
[
  {
    "name": "BlockNis"
  },
  {
    "name": "BlackWhite_Kian",
    "changedToAt": 1592595582000
  },
  {
    "name": "raze_ttv",
    "changedToAt": 1618853629000
  },
  {
    "name": "zemstaofficiar",
    "changedToAt": 1633885392000
  },
  {
    "name": "zoro_mc",
    "changedToAt": 1640290030395
  }
] 
$ curl https://api.mojang.com/users/profiles/minecraft/zemstaofficiar -i
HTTP/1.1 204 No Content
Connection: keep-alive
Accept-Ranges: bytes
Cache-Control: no-store
Date: Sun, 24 Apr 2022 17:59:57 GMT
Server: Restlet-Framework/2.4.3
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
X-Cache: Miss from cloudfront
Via: 1.1 7210fed509d8e341021bffe29c62787c.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: WAW50-C1
X-Amz-Cf-Id: e83GHowTk0eZaFLJwuEp5FgCvrM-ZDoQc9MzRlAk2sKUjFcCx4aiLQ==

$ curl https://api.mojang.com/users/profiles/minecraft/zoro_mc -i
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 58
Connection: keep-alive
Accept-Ranges: bytes
Cache-Control: no-store
Date: Sun, 24 Apr 2022 18:00:03 GMT
Server: Restlet-Framework/2.4.3
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
X-Cache: Miss from cloudfront
Via: 1.1 02362f0faae05408640185d927020628.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: WAW50-C1
X-Amz-Cf-Id: GknHehEluCamgRtZc0_hAYQVDncuF3qhztDT5ZVteE58GDbvkDRRgw=={"name":"zoro_mc","id":"825b8307bf8348f0ae3cc74722899bb7"}

It's sth wrong - one API returns that zemstaofficiar is actual nickname (GET profile), second API returns both nicknames to be actual (POST profiles)

Comments 8

Do you mean that POST https://api.mojang.com/profiles/minecraft should not include results for zemstaofficiar?
Because all other API responses only seem to contain zoro_mc as the latest name.

@Marcono1234 exactly yes. The first curl response I quoted is werid - it returned two accounts with different nickname, but with the same UUID. I edited my report to clarify it.

Would it be ok then to change the summary of this issue to "/profiles/minecraft includes results for changed player names" or similar? (assuming that I understood the issue correctly)

Nope, bcuz it doesn't include results for changed player names. `zemstaofficiar` is only exception and I don't know why.

Example where the result is correct:

$ curl -X POST https://api.mojang.com/profiles/minecraft --data '["k0l0r3k99","_R3dd1t"]' -H "Content-Type: application/json"
                                                         [{"id":"280dce8187ea4620bbbbf5f64060ea67","name":"k0l0r3k99"}]

This endpoint works fine for all accounts except zemstaofficiar.

Thanks a lot for the clarification! I have edited the report a bit to describe this more in detail. Hopefully that is alright for you.

What is the ETA for this issue?

This is due to that API fetching 3 databases Legacy, Mojang, and Microsoft. If you migrate then change your name the other name will still reside in the old database. I'm not fully sure if this should be considered bug, because this is working correctly according to the implementation.

This has been fixed with the removal of the older databases now only checking 1 universal Microsoft database.

k0l0r3k99

web

API

Retrieved