Set a 10 char minimum password length.

This commit is contained in:
Dessalines 2021-09-18 19:43:08 -04:00
parent e84e1193fc
commit 1033995801

View file

@ -426,7 +426,8 @@ pub async fn build_federated_instances(
/// Checks the password length /// Checks the password length
pub fn password_length_check(pass: &str) -> Result<(), LemmyError> { pub fn password_length_check(pass: &str) -> Result<(), LemmyError> {
if pass.len() > 60 { let password_length = pass.len();
if !(10..=60).contains(&password_length) {
Err(ApiError::err("invalid_password").into()) Err(ApiError::err("invalid_password").into())
} else { } else {
Ok(()) Ok(())