Open myrkvi opened 2 months ago
This is technically a partial non-issue because all it breaks is fetching the application, whether that be a client opening the profile or bots going through presences.
This presence comes from internally dispatching a presence through the client via client mods, as also evident by the fact the large_image
key points to an attachment, whereas the RPC will always convert links passed through to the external
route of media proxy.
Clientside validation is done, but only for presences over RPC. Once it's gets to being dispatched, no validation is done. Discord could add further serverside validation if they wanted to prevent this, but it breaks very little as I mentioned.
This breaks clients with strict typing, when deserializing JSON.
per presence update docs:
no fields are required, and the types of the fields are not validated. Your client should expect any combination of fields and types within this event.
since snowflakes are internally stored and processed as numbers, and only converted to strings during serialization if they are over the max int, there are unfortunately various cases where small number snowflakes are serialized as numbers instead as strings.
Description
During the
GUILD_CREATE
andPRESENCE_UPDATE
gateway events, there is a user who has an activity with the name Silksong, that has the fieldapplication_id
set to1
. This does not seem to be a valid snowflake ID, per the documentation.Excerpt of JSON received is:
Steps to Reproduce
I do not know if there is a way to reliably replicate this. This seems to happen in a medium-sized guild (~5000 users) , but no others. Would likely require someone to play Hollow Knight: Silksong, as that is the game indicated.
Expected Behavior
The
application_id
field should be a valid snowflake / JSON stringCurrent Behavior
the field
application_id
is the integer1
.Screenshots/Videos
No response
Client and System Information
Library: disgo v0.18.13 OS: Heroku-based Ubuntu Linux and Arch Linux