From c612641e92e9c45ef6af4795fe2450bac5830369 Mon Sep 17 00:00:00 2001 From: Mike Alvarino Date: Thu, 23 Oct 2025 16:57:57 -0400 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Update=20password=20max=20?= =?UTF-8?q?length=20(#1447)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sofie Van Landeghem --- backend/app/models.py | 12 ++++++------ frontend/src/client/schemas.gen.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/app/models.py b/backend/app/models.py index 2389b4a..2d060ba 100644 --- a/backend/app/models.py +++ b/backend/app/models.py @@ -14,19 +14,19 @@ class UserBase(SQLModel): # Properties to receive via API on creation class UserCreate(UserBase): - password: str = Field(min_length=8, max_length=40) + password: str = Field(min_length=8, max_length=128) class UserRegister(SQLModel): email: EmailStr = Field(max_length=255) - password: str = Field(min_length=8, max_length=40) + password: str = Field(min_length=8, max_length=128) full_name: str | None = Field(default=None, max_length=255) # Properties to receive via API on update, all are optional class UserUpdate(UserBase): email: EmailStr | None = Field(default=None, max_length=255) # type: ignore - password: str | None = Field(default=None, min_length=8, max_length=40) + password: str | None = Field(default=None, min_length=8, max_length=128) class UserUpdateMe(SQLModel): @@ -35,8 +35,8 @@ class UserUpdateMe(SQLModel): class UpdatePassword(SQLModel): - current_password: str = Field(min_length=8, max_length=40) - new_password: str = Field(min_length=8, max_length=40) + current_password: str = Field(min_length=8, max_length=128) + new_password: str = Field(min_length=8, max_length=128) # Database model, database table inferred from class name @@ -110,4 +110,4 @@ class TokenPayload(SQLModel): class NewPassword(SQLModel): token: str - new_password: str = Field(min_length=8, max_length=40) + new_password: str = Field(min_length=8, max_length=128) diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index a5c029d..a924713 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -202,7 +202,7 @@ export const NewPasswordSchema = { }, new_password: { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8, title: 'New Password' } @@ -258,13 +258,13 @@ export const UpdatePasswordSchema = { properties: { current_password: { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8, title: 'Current Password' }, new_password: { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8, title: 'New Password' } @@ -306,7 +306,7 @@ export const UserCreateSchema = { }, password: { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8, title: 'Password' } @@ -367,7 +367,7 @@ export const UserRegisterSchema = { }, password: { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8, title: 'Password' }, @@ -430,7 +430,7 @@ export const UserUpdateSchema = { anyOf: [ { type: 'string', - maxLength: 40, + maxLength: 128, minLength: 8 }, {