Skip to content

Commit

Permalink
Fix databases broken with missing AES KDF UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
bpellin committed Jun 12, 2021
1 parent a2dad15 commit d9c6661
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Fix databases broken with missing AES KDF UUID

KeePassDroid (2.5.17)
* Fix KDBX3 -> 4 upgrade

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ public static KdfParameters deserialize(byte[] data) throws IOException {
return null;
}

UUID uuid = Types.bytestoUUID(d.getByteArray(ParamUUID));
byte[] uuidBytes = d.getByteArray((ParamUUID));
UUID uuid;
if (uuidBytes != null) {
uuid = Types.bytestoUUID(uuidBytes);
} else {
// Correct issue where prior versions were writing empty UUIDs for AES
uuid = AesKdf.CIPHER_UUID;
}

if (uuid == null) {
assert(false);
return null;
Expand Down

0 comments on commit d9c6661

Please sign in to comment.