mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-11-07 04:42:59 -05:00
Update Rust, crates and web-vault (#4328)
- Updated Rust to v1.76.0 - Updated crates - Updated web-vault to v2024.1.2b - Fixed some Clippy lints - Moved lint check configuration Cargo.toml - Fixed issue with Reset Password Enrollment when logged-in via device
This commit is contained in:
committed by
GitHub
parent
897bdf8343
commit
b9bdc9b8e2
@@ -2659,6 +2659,7 @@ async fn delete_group_user(
|
||||
struct OrganizationUserResetPasswordEnrollmentRequest {
|
||||
ResetPasswordKey: Option<String>,
|
||||
MasterPasswordHash: Option<String>,
|
||||
Otp: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -2841,14 +2842,12 @@ async fn put_reset_password_enrollment(
|
||||
}
|
||||
|
||||
if reset_request.ResetPasswordKey.is_some() {
|
||||
match reset_request.MasterPasswordHash {
|
||||
Some(password) => {
|
||||
if !headers.user.check_valid_password(&password) {
|
||||
err!("Invalid or wrong password")
|
||||
}
|
||||
}
|
||||
None => err!("No password provided"),
|
||||
};
|
||||
PasswordOrOtpData {
|
||||
MasterPasswordHash: reset_request.MasterPasswordHash,
|
||||
Otp: reset_request.Otp,
|
||||
}
|
||||
.validate(&headers.user, true, &mut conn)
|
||||
.await?;
|
||||
}
|
||||
|
||||
org_user.reset_password_key = reset_request.ResetPasswordKey;
|
||||
|
||||
Reference in New Issue
Block a user