fix bug when created query string is not present

This commit is contained in:
2020-05-16 23:28:21 -05:00
parent 684128361c
commit 62a062fff2
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ def magiclink(token):
return redirect(url_for("console.index"))
else:
# this is here to prevent xss
if not re.match(r"^[a-zA-Z0-9_-]+$", token):
if token and not re.match(r"^[a-zA-Z0-9_-]+$", token):
token = '___________'
abort(404, f"Token {token} doesn't exist or has already been used.")