lab3: second tiny fix
This commit is contained in:
+1
-1
@@ -333,7 +333,7 @@ async def create_user(request: Request):
|
||||
invalid("Некорректный username")
|
||||
display = text_field(data["display_name"], 100)
|
||||
password = data["password"]
|
||||
if not isinstance(password, str) or not 12 <= len(password) <= 128:
|
||||
if not isinstance(password, str) or not password.strip() or not 12 <= len(password) <= 128:
|
||||
invalid("Некорректный пароль")
|
||||
try:
|
||||
return await asyncio.to_thread(insert_user, name, display, password)
|
||||
|
||||
Reference in New Issue
Block a user