Skip to content

Commit fb9afa1

Browse files
committed
password length bug fix
1 parent 1ddf786 commit fb9afa1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

AUTO_CONFIG.JSON

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"FAST_API_SERVER_IP_WILL_AUTO_GENERATE": "192.168.0.109",
2+
"FAST_API_SERVER_IP_WILL_AUTO_GENERATE": "192.168.0.107",
33
"FAST_API_AUTH_SALT_WILL_AUTO_GENERATE": "WILL_AUTO_GENERATE"
44
}

backend/fast_api/fast_api_data_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def valid_str(string: str):
4242

4343

4444
class UserCreationModel(UserID):
45-
password: Annotated[str, AfterValidator(UserID.valid_str)]
45+
password: Annotated[str, Field(max_length=20, min_length=6)]
4646
user_name: Annotated[str, AfterValidator(UserID.valid_str)]
4747

4848

4949
class UserUpdateModel(BaseModel):
50-
password: Annotated[str, AfterValidator(UserID.valid_str)]
50+
password: Annotated[str, Field(max_length=20, min_length=6)]
5151
user_name: Annotated[str, AfterValidator(UserID.valid_str)]
5252

5353

frontend/app/api/validators.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export function isValidNumber(number) {
1515

1616
export function isValidPassword(password) {
1717
try {
18-
if (password.length < 5 || password.length > 18) {
19-
return "Invalid Length, Must Be Between 5-18";
18+
if (password.length < 6 || password.length > 18) {
19+
return "Invalid Length, Must Be Between 6-18";
2020
}
2121
return true;
2222
} catch {

0 commit comments

Comments
 (0)