From: Dessalines Date: Mon, 5 Oct 2020 00:10:15 +0000 (-0500) Subject: Password length check. Fixes #1087 X-Git-Url: http://these/git/%22https:/image.com/%7BcommunityRSSUrl%28?a=commitdiff_plain;h=557d476001cd1e918ef27697cf9f800d05fcb208;p=lemmy.git Password length check. Fixes #1087 --- diff --git a/lemmy_api/src/user.rs b/lemmy_api/src/user.rs index 4324c936..17bb1209 100644 --- a/lemmy_api/src/user.rs +++ b/lemmy_api/src/user.rs @@ -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 if data.password != data.password_verify { return Err(APIError::err("passwords_dont_match").into());