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 62c7a4d491a59e0e7510eaf6b8b49b537cd7a752
parent f4a9645b54f1c7361799c394360fdc079df9f502
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Sun, 23 Jan 2022 23:42:42 +0100

Merge branch 'BlackDex-fix-emergency-invite-register' into main

Diffstat:
Msrc/api/core/accounts.rs | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs @@ -87,14 +87,11 @@ fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult { user_org.status = UserOrgStatus::Accepted as i32; user_org.save(&conn)?; } - + user + } else if EmergencyAccess::find_invited_by_grantee_email(&email, &conn).is_some() { user } else if CONFIG.is_signup_allowed(&email) { - // check if it's invited by emergency contact - match EmergencyAccess::find_invited_by_grantee_email(&data.Email, &conn) { - Some(_) => user, - _ => err!("Account with this email already exists"), - } + err!("Account with this email already exists") } else { err!("Registration not allowed or user already exists") }