only init logrocket once authed
This commit is contained in:
@@ -189,7 +189,7 @@ pub fn new_img(tx: &mut Transaction, id: Uuid) -> Result<Account, Error> {
|
||||
}
|
||||
|
||||
pub fn set_password(tx: &mut Transaction, id: Uuid, current: &String, password: &String) -> Result<String, MnmlHttpError> {
|
||||
if password.len() < PASSWORD_MIN_LEN {
|
||||
if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
|
||||
return Err(MnmlHttpError::PasswordUnacceptable);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result<
|
||||
|
||||
let id = Uuid::new_v4();
|
||||
let img = Uuid::new_v4();
|
||||
let rounds = 8;
|
||||
let rounds = 12;
|
||||
let password = hash(&password, rounds)?;
|
||||
|
||||
let mut rng = thread_rng();
|
||||
|
||||
+2
-1
@@ -449,7 +449,8 @@ 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