1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-03-03 17:56:05 +00:00

Require minimum 8 characters for passwords

This commit is contained in:
grossmj 2025-02-23 12:05:19 +10:00
parent 1f4071af93
commit a7f2b1fddc
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7
3 changed files with 4 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class UserCreate(UserBase):
"""
username: str = Field(..., min_length=3, pattern="[a-zA-Z0-9_-]+$")
password: SecretStr = Field(..., min_length=6, max_length=100)
password: SecretStr = Field(..., min_length=8, max_length=100)
class UserUpdate(UserBase):
@ -47,7 +47,7 @@ class UserUpdate(UserBase):
Properties to update a user.
"""
password: Optional[SecretStr] = Field(None, min_length=6, max_length=100)
password: Optional[SecretStr] = Field(None, min_length=8, max_length=100)
class LoggedInUserUpdate(BaseModel):
@ -55,7 +55,7 @@ class LoggedInUserUpdate(BaseModel):
Properties to update a logged-in user.
"""
password: Optional[SecretStr] = Field(None, min_length=6, max_length=100)
password: Optional[SecretStr] = Field(None, min_length=8, max_length=100)
email: Optional[EmailStr] = None
full_name: Optional[str] = None

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@ rm -Rf /tmp/gns3-registry
git clone https://github.com/GNS3/gns3-registry.git /tmp/gns3-registry
mv /tmp/gns3-registry/appliances gns3server/appliances
mv /tmp/gns3-registry/symbols gns3server/custom_symbols
rm gns3server/custom_symbols/*.{txt,rst,md}
rm -f gns3server/custom_symbols/*.{txt,rst,md}
git add gns3server/appliances/*
git add gns3server/custom_symbols/*