mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +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
|
|
@ -87,11 +87,7 @@ impl Service {
|
|||
|
||||
// Check if password is correct
|
||||
if let Some(hash) = services().users.password_hash(&user_id)? {
|
||||
let hash_matches =
|
||||
argon2::verify_encoded(&hash, password.as_bytes())
|
||||
.unwrap_or(false);
|
||||
|
||||
if !hash_matches {
|
||||
if !utils::verify_password_hash(hash, password) {
|
||||
uiaainfo.auth_error =
|
||||
Some(ruma::api::client::error::StandardErrorBody {
|
||||
kind: ErrorKind::forbidden(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue