forked from mrlan/EnglishPal
fix: add url 'admin' into banned url list
parent
df82748518
commit
e2b165ada8
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue