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 e2ab2f7306a7adf31daf9f560f840be9174e583f
parent 9e63985b284e4529825b8ac9a41a27eb42153396
Author: Jean-Christophe BEGUE <jean-Christophe.begue@fraudbuster.mobi>
Date:   Tue, 11 Sep 2018 13:00:59 +0200

Save None instead of empty password hint

Diffstat:
Msrc/api/core/accounts.rs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs @@ -82,7 +82,10 @@ fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) - let mut user = headers.user; user.name = data.Name; - user.password_hint = data.MasterPasswordHint; + user.password_hint = match data.MasterPasswordHint { + Some(ref h) if h.is_empty() => None, + _ => data.MasterPasswordHint, + }; user.save(&conn); Ok(Json(user.to_json(&conn)))