aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-05-21 20:29:44 -0700
committerGravatar MarkKoz <[email protected]>2020-05-21 20:29:44 -0700
commite23aa887959059e17fc21dcab9c83db20dc987f5 (patch)
tree64e36657425ea2b64bc901b0204c97da670354ed
parentAdd a utility function to pad base64 data (diff)
Token remover: decode ID using URL-safe base64
Though I've not seen an ID with neither + and \ nor - and _, given that the timestamp uses URL-safe encoding, the ID probably does too.
-rw-r--r--bot/cogs/token_remover.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/token_remover.py b/bot/cogs/token_remover.py
index cae482e6e..5b4598959 100644
--- a/bot/cogs/token_remover.py
+++ b/bot/cogs/token_remover.py
@@ -150,7 +150,7 @@ class TokenRemover(Cog):
b64_content = utils.pad_base64(b64_content)
try:
- decoded_bytes: bytes = base64.b64decode(b64_content)
+ decoded_bytes = base64.urlsafe_b64decode(b64_content)
string = decoded_bytes.decode('utf-8')
# isdigit on its own would match a lot of other Unicode characters, hence the isascii.