mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-26 15:16:39 +00:00
return an error when email adress for password hint is not valid
This commit is contained in:
parent
1c641d7635
commit
37d88be2be
@ -264,7 +264,7 @@ fn password_hint(data: JsonUpcase<PasswordHintData>, conn: DbConn) -> EmptyResul
|
|||||||
let data: PasswordHintData = data.into_inner().data;
|
let data: PasswordHintData = data.into_inner().data;
|
||||||
|
|
||||||
if !is_valid_email(&data.Email) {
|
if !is_valid_email(&data.Email) {
|
||||||
return Ok(());
|
return err!("This email address is not valid...");
|
||||||
}
|
}
|
||||||
|
|
||||||
let user = User::find_by_mail(&data.Email, &conn);
|
let user = User::find_by_mail(&data.Email, &conn);
|
||||||
|
Loading…
Reference in New Issue
Block a user