vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 53fa8da5b1b29377ae285b09530093bae9be4129
parent 8c1117fcbf0e500e7ecf9df93bdeb6700fc57db5
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Sun, 12 Feb 2023 18:42:30 +0100

Merge pull request #3215 from stefan0xC/fix-post-emergency-access

don't nullify key when editing emergency access
Diffstat:
Msrc/api/core/emergency_access.rs | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/api/core/emergency_access.rs b/src/api/core/emergency_access.rs @@ -123,7 +123,9 @@ async fn post_emergency_access( emergency_access.atype = new_type; 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?; Ok(Json(emergency_access.to_json()))