mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-11 11:15:58 +03:00
Fix Login With Device without MasterPassword
It looks like either something changed in the latest v2023.8.x versions, or when using Biometrics to login, but the MasterPasswordHash is an optional value during the Approve action. This PR makes the MasterPasswordHash an optional value which resolves this issues. Bitwarden works the same way. I also changed the EncKey to an Option in the database since empty strings as a default value is not nice in databases, better to use `null` in these cases. Fixes #3819
This commit is contained in:
@@ -20,9 +20,9 @@ db_object! {
|
||||
pub access_code: String,
|
||||
pub public_key: String,
|
||||
|
||||
pub enc_key: String,
|
||||
pub enc_key: Option<String>,
|
||||
|
||||
pub master_password_hash: String,
|
||||
pub master_password_hash: Option<String>,
|
||||
pub approved: Option<bool>,
|
||||
pub creation_date: NaiveDateTime,
|
||||
pub response_date: Option<NaiveDateTime>,
|
||||
@@ -53,8 +53,8 @@ impl AuthRequest {
|
||||
response_device_id: None,
|
||||
access_code,
|
||||
public_key,
|
||||
enc_key: String::new(),
|
||||
master_password_hash: String::new(),
|
||||
enc_key: None,
|
||||
master_password_hash: None,
|
||||
approved: None,
|
||||
creation_date: now,
|
||||
response_date: None,
|
||||
|
Reference in New Issue
Block a user