@@ -372,7 +372,6 @@ const QList<Entry*>& Entry::historyItems() const
|
||||
void Entry::addHistoryItem(Entry* entry)
|
||||
{
|
||||
Q_ASSERT(!entry->parent());
|
||||
Q_ASSERT(entry->uuid() == uuid());
|
||||
|
||||
m_history.append(entry);
|
||||
Q_EMIT modified();
|
||||
|
||||
@@ -778,6 +778,13 @@ Entry* KeePass2XmlReader::parseEntry(bool history)
|
||||
}
|
||||
|
||||
Q_FOREACH (Entry* historyItem, historyItems) {
|
||||
if (historyItem->uuid() != entry->uuid()) {
|
||||
if (m_strictMode) {
|
||||
raiseError("History element with different uuid");
|
||||
} else {
|
||||
historyItem->setUuid(entry->uuid());
|
||||
}
|
||||
}
|
||||
entry->addHistoryItem(historyItem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user