mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-01 00:30:17 -05:00
Fix updating reference passwords from KeePassXC-Browser (#2218)
* Allow updating reference passwords * Fix function change after refactor
This commit is contained in:
parent
94430c300b
commit
0da9efdbd4
4 changed files with 35 additions and 1 deletions
|
|
@ -244,6 +244,24 @@ void EntryAttributes::copyDataFrom(const EntryAttributes* other)
|
|||
}
|
||||
}
|
||||
|
||||
QUuid EntryAttributes::referenceUuid(const QString& key) const
|
||||
{
|
||||
if (!m_attributes.contains(key)) {
|
||||
Q_ASSERT(false);
|
||||
return {};
|
||||
}
|
||||
|
||||
auto match = matchReference(value(key));
|
||||
if (match.hasMatch()) {
|
||||
const QString uuid = match.captured("SearchText");
|
||||
if (!uuid.isEmpty()) {
|
||||
return QUuid::fromRfc4122(QByteArray::fromHex(uuid.toLatin1()));
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
bool EntryAttributes::operator==(const EntryAttributes& other) const
|
||||
{
|
||||
return (m_attributes == other.m_attributes && m_protectedAttributes == other.m_protectedAttributes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue