From 9d86bc0f7497170ea77695cbdb9e5eff343790db Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 29 Jul 2021 15:24:29 +0100 Subject: [PATCH] Check length of nickname --- utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.py b/utils.py index abf25d28f..e70657ca4 100644 --- a/utils.py +++ b/utils.py @@ -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 = ('.', ' ', '/', '?', ':', ';', '@', '#')