mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 12:51:18 +00:00
Merge pull request #1173 from LemmyNet/password_length_check
Password length check. Fixes #1087
This commit is contained in:
commit
c6c107cad1
1 changed files with 5 additions and 0 deletions
|
@ -117,6 +117,11 @@ impl Perform for Register {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Password length check
|
||||||
|
if data.password.len() > 60 {
|
||||||
|
return Err(APIError::err("invalid_password").into());
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure passwords match
|
// Make sure passwords match
|
||||||
if data.password != data.password_verify {
|
if data.password != data.password_verify {
|
||||||
return Err(APIError::err("passwords_dont_match").into());
|
return Err(APIError::err("passwords_dont_match").into());
|
||||||
|
|
Loading…
Reference in a new issue