mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-24 07:36:40 +03:00
include key into user.set_password
This commit is contained in:
1 parent
2d8c8e18f7
commit
cc91ac6cc0
4 files changed
+21
-12
No files matched your search
@@ -644,7 +644,7 @@ async fn password_emergency_access(
|
||||
|
||||
let data: EmergencyAccessPasswordData = data.into_inner().data;
|
||||
let new_master_password_hash = &data.NewMasterPasswordHash;
|
||||
let key = data.Key;
|
||||
//let key = &data.Key;
|
||||
|
||||
let requesting_user = headers.user;
|
||||
let emergency_access = match EmergencyAccess::find_by_uuid(&emer_id, &mut conn).await {
|
||||
@@ -662,8 +662,7 @@ async fn password_emergency_access(
|
||||
};
|
||||
|
||||
// change grantor_user password
|
||||
grantor_user.set_password(new_master_password_hash, true, None);
|
||||
grantor_user.akey = key;
|
||||
grantor_user.set_password(new_master_password_hash, Some(data.Key), true, None);
|
||||
grantor_user.save(&mut conn).await?;
|
||||
|
||||
// Disable TwoFactor providers since they will otherwise block logins
|
||||
|
||||
Reference in new issue
Block a user