Introduce a strict mode in KeePass2XmlReader.

Many errors are now ignored when not in strict mode so we can still parse
files that have been written by broken/incomplete implementations.
This commit is contained in:
Felix Geyer
2014-12-01 21:52:51 +01:00
parent 226c061c01
commit 71d39865b3
7 changed files with 127 additions and 16 deletions

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<KeePassFile>
<Root>
<Group>
<UUID>lmU+9n0aeESKZvcEze+bRg==</UUID>
<Name>Test</Name>
<Entry>
<UUID>AaUYVdXsI02h4T1RiAlgtg==</UUID>
<String>
<Key>Title</Key>
<Value>Sample Entry 1</Value>
</String>
</Entry>
</Group>
<DeletedObjects>
<DeletedObject>
<UUID/>
<DeletionTime>2010-08-25T16:14:12Z</DeletionTime>
</DeletedObject>
<DeletedObject/>
<DeletedObject>
<UUID>5K/bzWCSmkCv5OZxYl4N/w==</UUID>
<DeletionTime/>
</DeletedObject>
</DeletedObjects>
</Root>
</KeePassFile>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<KeePassFile>
<Meta>
<RecycleBinEnabled>True</RecycleBinEnabled>
<RecycleBinUUID>6w7wZdhAp0qVlXjkemuCYw==</RecycleBinUUID>
</Meta>
<Root>
<Group>
<UUID>lmU+9n0aeESKZvcEze+bRg==</UUID>
<Name>Test</Name>
<Entry>
<UUID>AaUYVdXsI02h4T1RiAlgtg==</UUID>
<String>
<Key>Title</Key>
<Value>Sample Entry 1</Value>
</String>
</Entry>
</Group>
</Root>
</KeePassFile>

View File

@@ -9,6 +9,7 @@
<Key>Title</Key>
<Value>Sample Entry 1</Value>
</String>
</Entry>
</Group>
</Root>
</KeePassFile>