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

Correct Discord Invite Regex #129

Open
mbaruh opened this issue Aug 27, 2022 · 1 comment
Open

Correct Discord Invite Regex #129

mbaruh opened this issue Aug 27, 2022 · 1 comment
Labels
s: planning A feature being considered or discussed

Comments

@mbaruh
Copy link
Member

mbaruh commented Aug 27, 2022

The current invite regex is too permissive. It captures any non-space character, while invite codes can only have letters and numbers.

r"(?P<invite>\S+)", # the invite code itself

In c9daa6f we made it go until the whitespace because of the way the Discord client parses invites, but we can safely account for it by adding / to the character class instead (i.e [a-zA-Z0-9/-]).

@mbaruh mbaruh added the s: planning A feature being considered or discussed label Aug 27, 2022
@mbaruh
Copy link
Member Author

mbaruh commented Aug 27, 2022

Sooo apparently there are other characters to account for here. The only thing that I can say atm is that a ? stops the invite code parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: planning A feature being considered or discussed
Projects
None yet
Development

No branches or pull requests

1 participant