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:
parent
1f4071af93
commit
a7f2b1fddc
@ -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
@ -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/*
|
||||
|
Loading…
Reference in New Issue
Block a user