From d26d2ec8df03f2cdc928024e1fca71970e576c27 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 29 Jul 2021 15:22:55 +0100 Subject: [PATCH] Same maximum username length as mastodon --- utils.py | 2 +- webapp_login.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 9c7c8c681..abf25d28f 100644 --- a/utils.py +++ b/utils.py @@ -1598,7 +1598,7 @@ def getNicknameValidationPattern() -> str: pattern += '(?!.*\\b' + word + '\\b)' else: pattern = '^(?!.*\\b' + word + '\\b)' - return pattern + '.*$' + return pattern + '.*${1,30}' def _isReservedName(nickname: str) -> bool: diff --git a/webapp_login.py b/webapp_login.py index f5c24322e..c8d6e50a0 100644 --- a/webapp_login.py +++ b/webapp_login.py @@ -177,7 +177,7 @@ def htmlLogin(cssCache: {}, translate: {}, translate['Password'] + '\n' + \ ' \n' + \ + 'pattern="{8,256}" name="password" required>\n' + \ loginButtonStr + registerButtonStr + '\n' + \ ' \n' + \ '\n' + \