Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

fix: wrong password length validation when registering a new user or resetting password (#247)

Leonardo Dias16d6b26c63c5
diff --git a/API/DTOs/RegisterDto.cs b/API/DTOs/RegisterDto.cs
index bcc93954f..d04c2a03e 100644
--- a/API/DTOs/RegisterDto.cs
+++ b/API/DTOs/RegisterDto.cs
@@ -7,7 +7,7 @@ namespace API.DTOs
[Required]
public string Username { get; init; }
[Required]
- [StringLength(32, MinimumLength = 4)]
+ [StringLength(32, MinimumLength = 6)]
public string Password { get; init; }
public bool IsAdmin { get; init; }
}
diff --git a/API/DTOs/ResetPasswordDto.cs b/API/DTOs/ResetPasswordDto.cs
index 535d0df2f..4b3ee3580 100644
--- a/API/DTOs/ResetPasswordDto.cs
+++ b/API/DTOs/ResetPasswordDto.cs
@@ -7,7 +7,7 @@ namespace API.DTOs
[Required]
public string UserName { get; init; }
[Required]
- [StringLength(16, MinimumLength = 4)]
+ [StringLength(32, MinimumLength = 6)]
public string Password { get; init; }
}
}
\ No newline at end of file