From 39377d8c9be4745188d137ca7b8826845986d91b Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:07:34 +0100 Subject: [PATCH] check if username is alphanumeric --- truthseeker/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/truthseeker/utils.py b/truthseeker/utils.py index 7cce76e..048dd29 100644 --- a/truthseeker/utils.py +++ b/truthseeker/utils.py @@ -1,6 +1,8 @@ def check_username(username): if not username: return False + if not username.isalnum(): + return False if not username == username.strip(): return False if not len(username) < 16: