Fix KDBX4 reader/writer attachment mapping error

Write duplicate attachments to the binary inner header only once and
skip duplicate entries when reading a KDBX4 file.
This fixes a an attachment mapping problem when an attachment appears
more than once in a database (which occurs frequently when editing attachment
entries and history is turned on)
This commit is contained in:
Janek Bevendorff 2018-01-25 00:41:24 +01:00
parent ee03d44053
commit c18d6b5ae5
No known key found for this signature in database
GPG key ID: 2FDEB0D40BCA5E11
5 changed files with 40 additions and 11 deletions

View file

@ -40,7 +40,7 @@ KdbxXmlReader::KdbxXmlReader(quint32 version)
* @param version KDBX version
* @param binaryPool binary pool
*/
KdbxXmlReader::KdbxXmlReader(quint32 version, QHash<QString, QByteArray>& binaryPool)
KdbxXmlReader::KdbxXmlReader(quint32 version, const QHash<QString, QByteArray>& binaryPool)
: m_kdbxVersion(version)
, m_binaryPool(binaryPool)
{