|
|
@ -773,11 +773,27 @@ class KdbxFormat { |
|
|
|
for (final el in document |
|
|
|
for (final el in document |
|
|
|
.findAllElements(KdbxXml.NODE_VALUE) |
|
|
|
.findAllElements(KdbxXml.NODE_VALUE) |
|
|
|
.where((el) => el.getAttributeBool(KdbxXml.ATTR_PROTECTED))) { |
|
|
|
.where((el) => el.getAttributeBool(KdbxXml.ATTR_PROTECTED))) { |
|
|
|
|
|
|
|
try { |
|
|
|
final pw = gen.decryptBase64(el.text.trim()); |
|
|
|
final pw = gen.decryptBase64(el.text.trim()); |
|
|
|
if (pw == null) { |
|
|
|
if (pw == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
KdbxFile.protectedValues[el] = ProtectedValue.fromString(pw); |
|
|
|
KdbxFile.protectedValues[el] = ProtectedValue.fromString(pw); |
|
|
|
|
|
|
|
} catch (e, stackTrace) { |
|
|
|
|
|
|
|
final stringKey = |
|
|
|
|
|
|
|
el.parentElement.singleElement(KdbxXml.NODE_KEY)?.text; |
|
|
|
|
|
|
|
final uuid = el.parentElement?.parentElement |
|
|
|
|
|
|
|
?.singleElement(KdbxXml.NODE_UUID) |
|
|
|
|
|
|
|
?.text; |
|
|
|
|
|
|
|
_logger.severe( |
|
|
|
|
|
|
|
'Error while decoding protected value in ' |
|
|
|
|
|
|
|
'{${el.breadcrumbsNames()}} of key' |
|
|
|
|
|
|
|
' {$stringKey} of entry {$uuid}.', |
|
|
|
|
|
|
|
e, |
|
|
|
|
|
|
|
stackTrace); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rethrow; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final keePassFile = document.findElements('KeePassFile').single; |
|
|
|
final keePassFile = document.findElements('KeePassFile').single; |
|
|
|