Implement V2 key rotation support

This commit is contained in:
Daniel García committed 2026-10-05 22:12:26 +02:00
1 parent 17cf7574b9
commit 04b3355283
18 files changed
+575 -119

No files matched your search

+4 -1
View File
@@ -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,