Fix logic bug on sign in

This commit is contained in:
Pierre HUBERT 2022-12-03 12:43:59 +01:00
parent 85e165bd29
commit 99780104e0
2 changed files with 5 additions and 1 deletions

View File

@ -130,7 +130,7 @@ impl Handler<LoginRequest> for UsersActor {
}
Ok(None) => MessageResult(LoginResult::AccountNotFound),
Ok(Some(user)) => {
if self
if !self
.manager
.verify_user_password(&user.uid, &msg.password)
.unwrap_or(false)

View File

@ -163,6 +163,10 @@ pub async fn login_route(
danger = Some("Your account is disabled!".to_string());
}
LoginResult::Error => {
danger = Some("An unkown error occured while trying to sign you in!".to_string());
}
c => {
log::warn!(
"Failed login for ip {:?} / username {}: {:?}",