Fix favicon corruption on loading database

* Fix #2251 and Fix #2674
* Icons stored with duplicate UUID's will be
assigned a new UUID on load. This causes entries
using the duplicate UUID to display the default icon.
This commit is contained in:
Jonathan White 2019-02-03 08:18:28 -05:00
parent cc932eff30
commit b4de4369eb

View File

@ -367,6 +367,10 @@ void KdbxXmlReader::parseIcon()
} }
if (uuidSet && iconSet) { if (uuidSet && iconSet) {
// Check for duplicate UUID (corruption)
if (m_meta->containsCustomIcon(uuid)) {
uuid = QUuid::createUuid();
}
m_meta->addCustomIcon(uuid, icon); m_meta->addCustomIcon(uuid, icon);
return; return;
} }