Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for file format change introduced in Bitwarden Desktop v2022.8.0 #18

Merged
merged 5 commits into from
Aug 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix for format change in Bitwarden Desktop v2022.8.0
Fix for data.json file format change introduced in Bitwarden Desktop 2022.8.0. (#17)

Fix support for pre Desktop 2022.8.0 data.json files.
GurpreetKang committed Aug 8, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c604c2968e4f0f55344e11a5b97a4bc0e3c4ca32
11 changes: 9 additions & 2 deletions BitwardenDecrypt.py
Original file line number Diff line number Diff line change
@@ -400,9 +400,16 @@ def decryptBitwardenJSON(options):

# Get/Decrypt All Organization Keys
for uuid in organizationKeys.items():
BitwardenSecrets['OrgSecrets'][uuid[0]] = decryptRSA(uuid[1]['key'], BitwardenSecrets['RSAPrivateKey'])
# File Format >= Desktop 2022.8.0
if type(uuid[1]) is dict:
BitwardenSecrets['OrgSecrets'][uuid[0]] = decryptRSA(uuid[1]['key'], BitwardenSecrets['RSAPrivateKey'])
# File Format < Desktop 2022.8.0
elif type(uuid[1]) is str:
BitwardenSecrets['OrgSecrets'][uuid[0]] = decryptRSA(uuid[1], BitwardenSecrets['RSAPrivateKey'])
else:
print(f"ERROR: Could Not Determine Organization Keys From File Format")



for a in datafile['data']:

supportedGroups = ['folders', 'ciphers', 'collections', 'organizations']