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 1ce2587330090d79c7d29d66ea6786b866e9e6d0
parent 20964ac2d8ec27f86bfb52eee99e915cacd5c7c3
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Wed, 16 Jan 2019 19:55:14 +0100

Correct update cipher order: first save cipher, then cipher-folder, then notify

Diffstat:
Msrc/api/core/ciphers.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs @@ -302,9 +302,9 @@ pub fn update_cipher_from_data( cipher.fields = data.Fields.map(|f| f.to_string()); cipher.data = type_data.to_string(); cipher.password_history = data.PasswordHistory.map(|f| f.to_string()); - - cipher.move_to_folder(data.FolderId, &headers.user.uuid, &conn)?; + cipher.save(&conn)?; + cipher.move_to_folder(data.FolderId, &headers.user.uuid, &conn)?; nt.send_cipher_update(ut, &cipher, &cipher.update_users_revision(&conn));