From 56a7359d7e3ac961fa16b7e0a16dd8c3dc2456f1 Mon Sep 17 00:00:00 2001 From: Yaroslaw Biloshytskyi Date: Sat, 31 Aug 2024 02:14:49 +0300 Subject: [PATCH] Small fixes --- app/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/utils.py b/app/utils.py index d8f2ef1c..1a2c36d2 100644 --- a/app/utils.py +++ b/app/utils.py @@ -334,6 +334,8 @@ async def check_cloudflare_captcha(response, secret): def is_protected_username(username: str): + username = username.strip().lower() + usernames = [ ["admin", "blog", "dev", "ftp", "mail", "pop", "pop3", "imap", "smtp"], ["stage", "stats", "status", "www", "beta", "about", "access"], @@ -395,7 +397,7 @@ def is_protected_username(username: str): def remove_bad_characters(text): - text.replace("\ufff4", "") + text = text.replace("\ufff4", "") return text