mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
switch to RustCrypto's argon2 crate
This commit is contained in:
parent
60d32ddf48
commit
aa4cd8b1e1
6 changed files with 58 additions and 58 deletions
|
|
@ -113,11 +113,7 @@ pub(crate) async fn login_route(
|
|||
));
|
||||
}
|
||||
|
||||
let hash_matches =
|
||||
argon2::verify_encoded(&hash, password.as_bytes())
|
||||
.unwrap_or(false);
|
||||
|
||||
if !hash_matches {
|
||||
if !utils::verify_password_hash(hash, password) {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::forbidden(),
|
||||
"Wrong username or password.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue