From 5cea214fd9acf38f5978496527e7d735e57ec820 Mon Sep 17 00:00:00 2001 From: kotoko Date: Sun, 19 Mar 2023 09:40:57 +0100 Subject: [PATCH] Min passwordlength =6 --- app/src/components/login.rs | 2 +- app/src/components/reset_password_step2.rs | 2 +- server/src/main.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/components/login.rs b/app/src/components/login.rs index 70218a1..cc6db50 100644 --- a/app/src/components/login.rs +++ b/app/src/components/login.rs @@ -23,7 +23,7 @@ pub struct LoginForm { pub struct FormModel { #[validate(length(min = 1, message = "Missing username"))] username: String, - #[validate(length(min = 8, message = "Invalid password. Min length: 8"))] + #[validate(length(min = 6, message = "Invalid password. Min length: 6"))] password: String, } diff --git a/app/src/components/reset_password_step2.rs b/app/src/components/reset_password_step2.rs index a14b36b..e7b3241 100644 --- a/app/src/components/reset_password_step2.rs +++ b/app/src/components/reset_password_step2.rs @@ -22,7 +22,7 @@ use yew_router::{ /// The fields of the form, with the constraints. #[derive(Model, Validate, PartialEq, Eq, Clone, Default)] pub struct FormModel { - #[validate(length(min = 8, message = "Invalid password. Min length: 8"))] + #[validate(length(min = 6, message = "Invalid password. Min length: 6"))] password: String, #[validate(must_match(other = "password", message = "Passwords must match"))] confirm_password: String, diff --git a/server/src/main.rs b/server/src/main.rs index 27eafae..acb9569 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -23,8 +23,8 @@ mod infra; async fn create_admin_user(handler: &SqlBackendHandler, config: &Configuration) -> Result<()> { let pass_length = config.ldap_user_pass.unsecure().len(); assert!( - pass_length >= 8, - "Minimum password length is 8 characters, got {} characters", + pass_length >= 6, + "Minimum password length is 6 characters, got {} characters", pass_length ); handler