diff options
Diffstat (limited to 'server/src/routes/ui/account/mod.rs')
-rw-r--r-- | server/src/routes/ui/account/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/routes/ui/account/mod.rs b/server/src/routes/ui/account/mod.rs index bdc6062..e39ef6c 100644 --- a/server/src/routes/ui/account/mod.rs +++ b/server/src/routes/ui/account/mod.rs @@ -1,3 +1,4 @@ +pub mod admin; pub mod session; use super::error::MyError; @@ -18,7 +19,7 @@ use rocket::{get, post, uri, FromForm, State}; #[derive(FromForm)] pub struct RegisterForm { - #[field(validate = len(8..32))] + #[field(validate = len(8..128))] pub invitation: String, #[field(validate = len(4..32))] pub username: String, @@ -108,7 +109,7 @@ pub fn r_account_register_post<'a>( Some(&User { display_name: form.username.clone(), name: form.username.clone(), - password: form.password.clone().into(), // TODO hash it + password: hash_password(&form.password), admin: false, }), ) |