relax password restrictions
This commit is contained in:
@@ -20,7 +20,7 @@ use img;
|
||||
use failure::Error;
|
||||
use failure::{err_msg, format_err};
|
||||
|
||||
static PASSWORD_MIN_LEN: usize = 11;
|
||||
static PASSWORD_MIN_LEN: usize = 3;
|
||||
|
||||
#[derive(Debug,Clone,Serialize,Deserialize)]
|
||||
pub struct Account {
|
||||
@@ -318,7 +318,7 @@ pub fn set_subscribed(tx: &mut Transaction, id: Uuid, subscribed: bool) -> Resul
|
||||
}
|
||||
|
||||
pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result<String, MnmlHttpError> {
|
||||
if password.len() < PASSWORD_MIN_LEN {
|
||||
if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
|
||||
return Err(MnmlHttpError::PasswordUnacceptable);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -449,7 +449,7 @@ pub fn start(pool: PgPool, events_tx: CbSender<Event>, stripe: StripeClient) {
|
||||
out.send(Message::Binary(response)).unwrap();
|
||||
}
|
||||
// we done
|
||||
Err(e) => {
|
||||
Err(_e) => {
|
||||
// info!("{:?}", e);
|
||||
break;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user