mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-29 15:14:06 -05:00
security: enforce min length for user password (#1555)
* fix typing on auth context * extract user password strength meter * fix broken useToggle method * extend form to accept arguments for validators * enforce password length on update * fix user password change form
This commit is contained in:
@@ -3,7 +3,7 @@ from pathlib import Path
|
||||
from typing import Any, Optional
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import UUID4, validator
|
||||
from pydantic import UUID4, Field, validator
|
||||
from pydantic.types import constr
|
||||
from pydantic.utils import GetterDict
|
||||
|
||||
@@ -49,7 +49,7 @@ class DeleteTokenResponse(MealieModel):
|
||||
|
||||
class ChangePassword(MealieModel):
|
||||
current_password: str
|
||||
new_password: str
|
||||
new_password: str = Field(..., min_length=8)
|
||||
|
||||
|
||||
class GroupBase(MealieModel):
|
||||
|
||||
Reference in New Issue
Block a user