mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-13 08:19:50 -05:00
Preserve Secret Service exposed group setting on merge
* Fixes #9371 - adds secret service custom data key to the list of protected custom data (will not be overwritten on merge)
This commit is contained in:
parent
3829bcdd8f
commit
94ace985e7
@ -190,7 +190,7 @@ void CustomData::updateLastModified(QDateTime lastModified)
|
||||
|
||||
bool CustomData::isProtected(const QString& key) const
|
||||
{
|
||||
return key.startsWith(CustomData::BrowserKeyPrefix) || key.startsWith(CustomData::Created);
|
||||
return key.startsWith(BrowserKeyPrefix) || key == Created || key == FdoSecretsExposedGroup;
|
||||
}
|
||||
|
||||
bool CustomData::isAutoGenerated(const QString& key) const
|
||||
|
@ -21,15 +21,6 @@
|
||||
#include "core/Database.h"
|
||||
#include "core/Metadata.h"
|
||||
|
||||
namespace Keys
|
||||
{
|
||||
namespace Db
|
||||
{
|
||||
constexpr auto FdoSecretsExposedGroup = "FDO_SECRETS_EXPOSED_GROUP";
|
||||
} // namespace Db
|
||||
|
||||
} // namespace Keys
|
||||
|
||||
namespace FdoSecrets
|
||||
{
|
||||
|
||||
@ -98,20 +89,19 @@ namespace FdoSecrets
|
||||
return exposedGroup(db.data());
|
||||
}
|
||||
|
||||
void FdoSecretsSettings::setExposedGroup(const QSharedPointer<Database>& db,
|
||||
const QUuid& group) // clazy:exclude=function-args-by-value
|
||||
void FdoSecretsSettings::setExposedGroup(const QSharedPointer<Database>& db, const QUuid& group)
|
||||
{
|
||||
setExposedGroup(db.data(), group);
|
||||
}
|
||||
|
||||
QUuid FdoSecretsSettings::exposedGroup(Database* db) const
|
||||
{
|
||||
return {db->metadata()->customData()->value(Keys::Db::FdoSecretsExposedGroup)};
|
||||
return {db->metadata()->customData()->value(CustomData::FdoSecretsExposedGroup)};
|
||||
}
|
||||
|
||||
void FdoSecretsSettings::setExposedGroup(Database* db, const QUuid& group) // clazy:exclude=function-args-by-value
|
||||
void FdoSecretsSettings::setExposedGroup(Database* db, const QUuid& group)
|
||||
{
|
||||
db->metadata()->customData()->set(Keys::Db::FdoSecretsExposedGroup, group.toString());
|
||||
db->metadata()->customData()->set(CustomData::FdoSecretsExposedGroup, group.toString());
|
||||
}
|
||||
|
||||
} // namespace FdoSecrets
|
||||
|
Loading…
Reference in New Issue
Block a user