fix JS bug, outlaw something more
This commit is contained in:
parent
99b816562c
commit
48f0582096
2 changed files with 13 additions and 12 deletions
|
|
@ -66,21 +66,22 @@ REPORT_UPDATE_ON_HOLD = 3
|
||||||
|
|
||||||
USERNAME_RE = r'[a-z2-9_-][a-z0-9_-]+'
|
USERNAME_RE = r'[a-z2-9_-][a-z0-9_-]+'
|
||||||
|
|
||||||
ILLEGAL_USERNAMES = (
|
ILLEGAL_USERNAMES = tuple((
|
||||||
## masspings and administrative claims
|
## masspings and administrative claims
|
||||||
'me', 'everyone', 'here', 'room', 'all', 'any', 'founder', 'owner',
|
'me everyone here room all any server app dev devel develop nil none '
|
||||||
'admin', 'administrator', 'mod', 'modteam', 'moderator', 'sysop', 'server', 'app'
|
'founder owner admin administrator mod modteam moderator sysop some '
|
||||||
## fictitious users and automations
|
## fictitious users and automations
|
||||||
'nobody', 'deleted', 'suspended', 'default', 'bot', 'developer', 'undefined', 'null',
|
'nobody deleted suspended default bot developer undefined null '
|
||||||
'ai', 'automod', 'automoderator', 'assistant', 'privacy', 'anonymous', 'removed'
|
'ai automod automoderator assistant privacy anonymous removed assistance '
|
||||||
## law enforcement corps and slurs because yes
|
## law enforcement corps and slurs because yes
|
||||||
'pedo', 'rape', 'rapist', 'nigger', 'retard', 'ncmec', 'police', 'cops', '911', 'childsafety',
|
'pedo rape rapist nigger retard ncmec police cops 911 childsafety '
|
||||||
'report', 'dmca', 'login', 'logout', 'security', 'order66', 'gestapo', 'ss', 'hitler',
|
'report dmca login logout security order66 gestapo ss hitler heilhitler kgb '
|
||||||
'pedophile', 'lolicon', 'giphy', 'tenor', 'csam', 'cp', 'pedobear', 'lolita',
|
'pedophile lolicon giphy tenor csam cp pedobear lolita lolice thanos '
|
||||||
'loli', 'kkk', 'pnf', 'adl', 'cop', 'tranny', 'google', 'trustandsafety', 'safety', 'ice',
|
'loli kkk pnf adl cop tranny google trustandsafety safety ice fbi nsa it '
|
||||||
## VVVVIP
|
## VVVVIP
|
||||||
'potus', 'realdonaldtrump', 'elonmusk', 'teddysphotos', 'mrbeast', 'jkrowling', 'pewdiepie'
|
'potus realdonaldtrump elonmusk teddysphotos mrbeast jkrowling pewdiepie '
|
||||||
)
|
'elizabethii king queen pontifex hogwarts lumos alohomora '
|
||||||
|
).split())
|
||||||
|
|
||||||
def username_is_legal(username: str) -> bool:
|
def username_is_legal(username: str) -> bool:
|
||||||
if len(username) < 2 or len(username) > 100:
|
if len(username) < 2 or len(username) > 100:
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
usernameInputMessage.className = 'username-input-message error';
|
usernameInputMessage.className = 'username-input-message error';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!resp.is_legal) {
|
if (resp.is_valid === false) {
|
||||||
usernameInputMessage.innerHTML = "You can't use this username.";
|
usernameInputMessage.innerHTML = "You can't use this username.";
|
||||||
usernameInputMessage.className = 'username-input-message error';
|
usernameInputMessage.className = 'username-input-message error';
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue