mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-23 13:38:09 +03:00
Implement V2 key rotation support
This commit is contained in:
18 files changed
+575
-119
No files matched your search
@@ -197,11 +197,14 @@ async fn sync(data: SyncData, headers: Headers, client_version: Option<ClientVer
|
||||
Value::Null
|
||||
};
|
||||
|
||||
// Upstream omits this when unset rather than sending null.
|
||||
// Upstream omits these two when unset rather than sending null.
|
||||
let mut user_decryption = json!({ "masterPasswordUnlock": master_password_unlock });
|
||||
if let Some(key_id) = &headers.user.key_id {
|
||||
user_decryption["userKeyId"] = json!(key_id);
|
||||
}
|
||||
if let Some(v2_upgrade_token) = headers.user.v2_upgrade_token_json() {
|
||||
user_decryption["v2UpgradeToken"] = v2_upgrade_token;
|
||||
}
|
||||
|
||||
Ok(Json(json!({
|
||||
"profile": user_json,
|
||||
|
||||
Reference in new issue
Block a user