1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-26 05:50:29 +01:00

don't nullify key when editing emergency access

the client does not send the key on every update of an emergency access
contact so the field would be emptied on a change of the wait days or access level.
Dieser Commit ist enthalten in:
Stefan Melmuk 2023-02-01 23:10:09 +01:00
Ursprung 9366e31452
Commit e65fbbfc21
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 817020C608FE9C09

Datei anzeigen

@ -123,7 +123,9 @@ async fn post_emergency_access(
emergency_access.atype = new_type; emergency_access.atype = new_type;
emergency_access.wait_time_days = data.WaitTimeDays; emergency_access.wait_time_days = data.WaitTimeDays;
emergency_access.key_encrypted = data.KeyEncrypted; if data.KeyEncrypted.is_some() {
emergency_access.key_encrypted = data.KeyEncrypted;
}
emergency_access.save(&mut conn).await?; emergency_access.save(&mut conn).await?;
Ok(Json(emergency_access.to_json())) Ok(Json(emergency_access.to_json()))