mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
Set a 10 char minimum password length.
This commit is contained in:
parent
e84e1193fc
commit
1033995801
1 changed files with 2 additions and 1 deletions
|
@ -426,7 +426,8 @@ pub async fn build_federated_instances(
|
|||
|
||||
/// Checks the password length
|
||||
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())
|
||||
} else {
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue