RiotGames / developer-relations

Riot Games Developer Ecosystem Bug Reporting
http://developer.riotgames.com
742 stars 44 forks source link

[BUG] NA summoner with unicode name cannot be looked up #671

Open molenzwiebel opened 2 years ago

molenzwiebel commented 2 years ago

Bug Description
The summoner 君 on NA (a real account!) cannot be looked up using the by-name endpoint, even though they exist.

Problem Description
There is a summoner named on NA which cannot be looked up through the by-name endpoint. The only way to retrieve their information is to find a match in which they participated, then taking the encrypted participant PUUID from the game and using that instead. This makes it impossible to query the summoner unless you already know a game in which they participated.

Large sites, such as op.gg or leagueofgraphs, do not suffer from this issue because they already have the summoner information from match crawling and perform an internal search before using the by-name API. Smaller sites, or those that do not crawl, cannot find the user.

Expected Result
I'd expect /lol/summoner/v4/summoners/by-name/%E5%90%9B to return the summoner information.

Actual Result

Looking them up by name:

{
    "status": {
        "message": "Data not found - summoner not found",
        "status_code": 404
    }
}

Looking them up by PUUID (can be retrieved through match-v5 for a match they participated in, such as NA1_4399722676):

{
    "id": "snip",
    "accountId": "snip",
    "puuid": "snip",
    "name": "君",
    "profileIconId": 938,
    "revisionDate": 1660013887000,
    "summonerLevel": 42
}

Developer Impact
If you don't already have the user in your database from crawling activity, they are impossible to look up. Since this user has no TFT games, it is impossible to query their summoner information if you are limited to a TFT key.

Player Impact
Service becomes impossible to use for the given user.

molenzwiebel commented 1 year ago

FWIW, I encountered this issue again with a non-unicode name. The summoner F on NA seems to have the same issue.

n1klas4008 commented 1 year ago

additionally I want to add that there was an exploit not long ago that allowed to create summoner names without any restrictions on the name, this resulted in alot of unicode names being created - the main issue here is how spaces are handled in names. For example on EUW there is a clean "7" and then theres "%EF%BB%BF%EF%BB%BF7" and "%EF%BB%BF%EF%BB%BF7%EF%BB%BF%EF%BB%BF". Those are zero-width-space characters that are not visible in the Client nor ingame which is why they were used, the problem here is that ALL kind of spaces get ignored hence all three names boil back down to "7" despite them being totally unique in theory. Not only that but there are alot of one and even two letter names going around which can not be looked up by the api either since they are to short, but they do exist.