Don't allow accounts as a username

merge-requests/8/head
Bob Mottram 2020-08-13 17:21:09 +01:00
parent 58bba56e75
commit 1c62500763
1 changed files with 2 additions and 1 deletions

View File

@ -584,12 +584,13 @@ def validNickname(domain: str, nickname: str) -> bool:
if nickname == domain: if nickname == domain:
return False return False
reservedNames = ('inbox', 'dm', 'outbox', 'following', reservedNames = ('inbox', 'dm', 'outbox', 'following',
'public', 'followers', 'profile', 'public', 'followers',
'channel', 'capabilities', 'calendar', 'channel', 'capabilities', 'calendar',
'tlreplies', 'tlmedia', 'tlblogs', 'tlreplies', 'tlmedia', 'tlblogs',
'moderation', 'activity', 'undo', 'moderation', 'activity', 'undo',
'reply', 'replies', 'question', 'like', 'reply', 'replies', 'question', 'like',
'likes', 'users', 'statuses', 'likes', 'users', 'statuses',
'accounts', 'channels', 'profile',
'updates', 'repeat', 'announce', 'updates', 'repeat', 'announce',
'shares', 'fonts', 'icons') 'shares', 'fonts', 'icons')
if nickname in reservedNames: if nickname in reservedNames: