Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused ValidDiscordServerInvite converter #3307

Conversation

decorator-factory
Copy link
Member

@decorator-factory decorator-factory commented Apr 6, 2025

This converter is not used anywhere.

In addition, this converter is vulnerable to Server-Side Request Forgery. If the argument looks like discord.gg/../nefarious, this converter is going to make the request GET https://discordapp.com/api/v7/invites/../nefarious, which is the same as GET https://discordapp.com/api/v7/nefarious.

Example of how it could be exploited:

  1. provide the "invite" discord.gg/../guilds/267624335836053506/bans/12345 (Get Guild Ban)
  2. if you observe that the bot got the status 404 for this request, user 12345 is not banned
  3. if you observe that the bot got the status 200 for this request, user 12345 is banned

So let's delete this so that we don't accidentally use it

@ChrisLovering ChrisLovering merged commit 479df30 into python-discord:main Apr 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants