mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-10-27 08:30:13 +00:00
Send null org key for unconfirmed members in sync (#7850)
Since #7666 the sync profile's `organizationsNew` also lists Accepted (not yet confirmed) memberships. Their `akey` is still empty, so the response contained `"key": ""`, whereas upstream sends `null` until the member is confirmed. Bitwarden Android 2026.9 prefers `organizationsNew` and only skips organizations whose key is null. The empty string is handed to the SDK, which rejects it ("Invalid asymmetric type, got type 0 with 1 parts"), so the whole `initializeOrgCrypto` call fails: none of the user's organization keys are loaded and every organization item and collection fails to decrypt on that device. Send null for an empty key, matching upstream and the existing handling of the user key in `GET /api/accounts/keys`. Claude-Session: https://claude.ai/code/session_011UHYQWTz2PkXSCfucaRMZB Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b71cb7a832
commit
c925c04de0
1 file changed
+2
-1
@@ -523,7 +523,8 @@ impl Membership {
|
||||
|
||||
// These are per user
|
||||
"userId": self.user_uuid,
|
||||
"key": self.akey,
|
||||
// Accepted (not yet confirmed) members have no key yet; send null like upstream, not ""
|
||||
"key": (!self.akey.is_empty()).then_some(&self.akey),
|
||||
"status": self.status,
|
||||
"type": membership_type,
|
||||
"enabled": true,
|
||||
|
||||
Reference in new issue
Block a user