Check length of nickname

main
Bob Mottram 2021-07-29 15:24:29 +01:00
parent d26d2ec8df
commit 9d86bc0f74
1 changed files with 4 additions and 0 deletions

View File

@ -1613,6 +1613,10 @@ def _isReservedName(nickname: str) -> bool:
def validNickname(domain: str, nickname: str) -> bool:
"""Is the given nickname valid?
"""
if len(nickname) == 0:
return False
if len(nickname) > 30:
return False
if not isValidLanguage(nickname):
return False
forbiddenChars = ('.', ' ', '/', '?', ':', ';', '@', '#')