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 6027b969f542b29365875fa78dbf77765b12d290
parent 93805a5d7bb32c1f3c2168cfa73b60593dfeb53e
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Sat, 16 Feb 2019 23:06:26 +0100

Delete old devices when deauthorizing user sessions

Diffstat:
Msrc/api/admin.rs | 1+
Msrc/api/core/accounts.rs | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/api/admin.rs b/src/api/admin.rs @@ -171,6 +171,7 @@ fn deauth_user(uuid: String, _token: AdminToken, conn: DbConn) -> EmptyResult { None => err!("User doesn't exist"), }; + Device::delete_all_by_user(&user.uuid, &conn)?; user.reset_security_stamp(); user.save(&conn) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs @@ -322,6 +322,7 @@ fn post_sstamp(data: JsonUpcase<PasswordData>, headers: Headers, conn: DbConn) - err!("Invalid password") } + Device::delete_all_by_user(&user.uuid, &conn)?; user.reset_security_stamp(); user.save(&conn) }