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/-]).
The current invite regex is too permissive. It captures any non-space character, while invite codes can only have letters and numbers.
bot-core/botcore/utils/regex.py
Line 15 in 127d0ef
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/-]).