fix: computing password verification no matter the username status

This commit is contained in:
Artemis 2025-02-01 15:04:48 +01:00
parent 08ffe8c850
commit b030163fb1

View file

@ -79,7 +79,10 @@ pub async fn handle_login(
let user_in_db = user::get(db, &values.username).await?;
let user = match user_in_db {
None => return Ok(miss()),
None => {
task::spawn_blocking(move || pw::verify("meow", "$argon2i$v=19$m=65536,t=3,p=1$fJ+f67UGHB+EIjGIDEwbSQ$V/nZPHmdyqHq8fTBTdt3sEmTyr0W7i/F98EIxaaJJt0")).await??;
return Ok(miss());
}
Some(v) => v,
};