discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.97k stars 1.27k forks source link

ETF Gateway leaking Guilds.Models.RecurrenceRule #6580

Closed Th3-M4jor closed 5 months ago

Th3-M4jor commented 11 months ago

Description

Similar to #4196 and #6320, another :__struct__ field is being leaked by the gateway, Guilds.Models.RecurrenceRule this time.

Steps to Reproduce

Currently unclear, I'm guessing this field is part of a GUILD_UPDATE event. It was reported for the Nostrum Library here.

Expected Behavior

No :__struct__ fields are sent as part of gateway events

Current Behavior

An event may include __struct__: Guilds.Models.RecurrenceRule in its body

Screenshots/Videos

No response

Client and System Information

Nostrum library on its latest commit.

Leastrio commented 9 months ago

Ive recently been getting Guilds.Models.ScheduledEventException leaked.

jb3 commented 6 months ago

Heads up we still have Nostrum users receiving these structs.

It's not critical for us anymore since we added protections to remove struct keys received from upstream, but does remain a bug.

ihumanable commented 6 months ago

@jb3

Heads up we still have Nostrum users receiving these structs.

It's not critical for us anymore since we added protections to remove struct keys received from upstream, but does remain a bug.

Do you know which struct is being sent over the gateway? Is it still the Guilds.Models.ScheduledEventException or some other struct key?

jb3 commented 6 months ago

Do you know which struct is being sent over the gateway? Is it still the Guilds.Models.ScheduledEventException or some other struct key?

The one reported today is the ScheduledEventException, testing now it looks like recurrence rule seems to be okay (at least on scheduled event create, not sure where else that struct might be serialized over gateway).

jb3 commented 6 months ago

Do you know which struct is being sent over the gateway? Is it still the Guilds.Models.ScheduledEventException or some other struct key?

The one reported today is the ScheduledEventException, testing now it looks like recurrence rule seems to be okay (at least on scheduled event create, not sure where else that struct might be serialized over gateway).

ollien commented 5 months ago

We have deployed a fix to prevent the __struct__ key from being leaked for Guilds.Models.ScheduledEventException.

Thanks so much for bringing this to our attention!