GitHub APIs return private avatar URLs #147297
-
Select Topic AreaQuestion BodyHey GitHub friends! 👋 It seems that since about a week ago, GitHub has been issuing JWT-signed avatars living on the At Gitpod (the company I work at), we store the GitHub user avatar URL in our Database once after the user signs up. This has been working for the past ~7 years without issue, but started breaking for some users who are part of this Private Avatars experiment on December 11th and has been impacting user signups since. I could not find a single mention of this new domain or other changes on the changelog, BlueSky, X or anywhere else on the interwebs. My questions regarding this feature are:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Hello @filiptronicek! Thanks for sharing this with us! I have opened an issue with our engineering team and will be sure to reply back once I hear from them |
Beta Was this translation helpful? Give feedback.
-
Hello @filiptronicek I've heard back from our engineering team and should be able to answer your questions now.
Yes! We will keep it for third party apps that are consuming avatars. However, any EMU avatar will not be reachable from the old endpoint. Also, we have no plan currently to return old urls from API or GitHub UI. The old avatar URLs can be constructed by the third parties as well
New tokens are generated each 15 minutes. They are valid for 20 minutes after their generation. This makes them usable between 5-20 minutes depending on the retrieval time after their generation. Third party apps can use old endpoint unless they are supporting our EMUs. If they are supporting EMUs, they can use either either API to get a refreshed token or we have redirecting endpoints which will redirect to private avatar URL with a fresh token. Now, avatars are reachable from following endpoints: https://avatars.githubusercontent.com/u/<user_id> This will return avatar if the owner is not an EMU. https://private-avatars.githubusercontent.com/u/<user_id>?jwt= This will return avatar if it has valid token. https://github.com/user_avatars/<user_id> This will return a redirect to avatar URL with a fresh token. https://github.com/.png This will return a redirect to avatar URL with a fresh token.
We have implemented this change due to a bug bounty report. Avatars from EMUs were enumerable and reachable by any actor since there is no validation mechanism to protect them. This was against our contract with our customers. Because We have decided to protect all avatars by making them private. This was due to high load in our avatar system. We have started to rollout to larger portion of our users this last week. We currently serving to 5% of users. Before, this was rolled out to 0.1% users for last two months. Please let me know if there is anything else I can do to help! |
Beta Was this translation helpful? Give feedback.
-
hello all! Apologies on the delay! I'll go ahead and look into these questions and reply back once I am able |
Beta Was this translation helpful? Give feedback.
Hello @filiptronicek I've heard back from our engineering team and should be able to answer your questions now.
Yes! We will keep it for third party apps that are consuming avatars. However, any EMU avatar will not be reachable from the old endpoint. Also, we have no plan currently to return old urls from API or GitHub UI. The old avatar URLs can be constructed by the third parties as well