From e2b165ada84b7ed4827e2f211f4aa55d9218a009 Mon Sep 17 00:00:00 2001 From: Awoodwhale Date: Mon, 20 Mar 2023 20:11:37 +0800 Subject: [PATCH] fix: add url 'admin' into banned url list --- app/Login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Login.py b/app/Login.py index 8e0030b..f914359 100644 --- a/app/Login.py +++ b/app/Login.py @@ -98,7 +98,7 @@ class UserName: for c in self.username: # a user name must not include special characters, except non-leading periods or underscores if c in string.punctuation and c is not '.' and c is not '_': return f'{c} is not allowed in the user name.' - if self.username in ['signup', 'login', 'logout', 'reset', 'mark', 'back', 'unfamiliar', 'familiar', 'del']: + if self.username in ['signup', 'login', 'logout', 'reset', 'mark', 'back', 'unfamiliar', 'familiar', 'del', "admin"]: return 'You used a restricted word as your user name. Please come up with a better one.' return 'OK'