Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2025-01-31 10:08:56 +01:00
Allow set-password only if account is unitialized
Dieser Commit ist enthalten in:
Ursprung
da8be29de0
Commit
6f9b88e572
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
|
@ -262,6 +262,10 @@ async fn post_set_password(data: Json<SetPasswordData>, headers: Headers, mut co
|
||||||
let data: SetPasswordData = data.into_inner();
|
let data: SetPasswordData = data.into_inner();
|
||||||
let mut user = headers.user;
|
let mut user = headers.user;
|
||||||
|
|
||||||
|
if user.private_key.is_some() {
|
||||||
|
err!("Account already intialized cannot set password")
|
||||||
|
}
|
||||||
|
|
||||||
// Check against the password hint setting here so if it fails, the user
|
// Check against the password hint setting here so if it fails, the user
|
||||||
// can retry without losing their invitation below.
|
// can retry without losing their invitation below.
|
||||||
let password_hint = clean_password_hint(&data.master_password_hint);
|
let password_hint = clean_password_hint(&data.master_password_hint);
|
||||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren