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

Could not deserialize object to XML #61

Closed
alexgleason opened this issue Apr 5, 2018 · 7 comments
Closed

Could not deserialize object to XML #61

alexgleason opened this issue Apr 5, 2018 · 7 comments

Comments

@alexgleason
Copy link

Hi, I opened sorz/TinyKeePass#9 and then realized that TinyKeePass relies on this library, which is actually throwing the error.

I have a KeePass file that openkeepass cannot parse. It says "Could not deserialize object to XML." I wish I could provide the kdbx, but it contains real passwords.

The same kdbx can be opened properly with KeeWeb, KeePassDroid, and KeePass Tusk. It's possible the file is corrupted and these other tools are just very lenient when parsing the XML. I'm not sure how to check.

@alexgleason
Copy link
Author

I opened the kdbx file with KeePass2 on Ubuntu and saved the file without making changes. This allowed the file to be parsed by openkeepass successfully.

This could be an issue with KeeWeb, which I used to create the file initially, although if the XML parser here were as lenient as the others that would be nice.

@timendum
Copy link

timendum commented May 4, 2018

I've managed to replicate the error, see attached file (password "demo").

The issue is due to Property, KeeWeb saves a null Value (ie <Value/>) but the field is not nullable.

Can you make Property.propertyValue nullable?

Thanks.

@cternes
Copy link
Owner

cternes commented May 5, 2018

Thank you for the investigation. I will have a look at it.

@alexgleason
Copy link
Author

Thanks! Does keepass have a spec? Should we open this bug with KeeWeb also? If KeeWeb is creating nonstandard files this should probably be changed on their end also.

@cternes
Copy link
Owner

cternes commented May 9, 2018

@timendum It seems not to be a problem with the null Values. They should be working fine.
@alexgleason Unfortunately keepass does not have a spec. It's all based on reengineering the whole stuff and hoping that the reengineering is correct. That is why it is so difficult to get the stuff working correctly .

@timendum
Copy link

timendum commented May 9, 2018

Anyway I've also opened a ticket on keeweb and indeed KeePass opens file with null values.

@cternes
Copy link
Owner

cternes commented May 11, 2018

I think I've found the issue. The problem was that keeweb rearranged the XML tags and that messed up my decryption. I've tested with the attached database file and it seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants