mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-06 04:15:01 -04:00
Add support for placeholders on the KeePassHTTP custom fields
This commit is contained in:
parent
cfe4299301
commit
2027429d87
1 changed files with 5 additions and 2 deletions
|
@ -259,13 +259,16 @@ Service::Access Service::checkAccess(const Entry *entry, const QString & host, c
|
||||||
|
|
||||||
KeepassHttpProtocol::Entry Service::prepareEntry(const Entry* entry)
|
KeepassHttpProtocol::Entry Service::prepareEntry(const Entry* entry)
|
||||||
{
|
{
|
||||||
KeepassHttpProtocol::Entry res(entry->resolvePlaceholder(entry->title()), entry->resolvePlaceholder(entry->username()), entry->resolvePlaceholder(entry->password()), entry->uuid().toHex());
|
KeepassHttpProtocol::Entry res(entry->resolveMultiplePlaceholders(entry->title()),
|
||||||
|
entry->resolveMultiplePlaceholders(entry->username()),
|
||||||
|
entry->resolveMultiplePlaceholders(entry->password()),
|
||||||
|
entry->uuid().toHex());
|
||||||
if (HttpSettings::supportKphFields()) {
|
if (HttpSettings::supportKphFields()) {
|
||||||
const EntryAttributes * attr = entry->attributes();
|
const EntryAttributes * attr = entry->attributes();
|
||||||
const auto keys = attr->keys();
|
const auto keys = attr->keys();
|
||||||
for (const QString& key: keys) {
|
for (const QString& key: keys) {
|
||||||
if (key.startsWith(QLatin1String("KPH: "))) {
|
if (key.startsWith(QLatin1String("KPH: "))) {
|
||||||
res.addStringField(key, attr->value(key));
|
res.addStringField(key, entry->resolveMultiplePlaceholders(attr->value(key)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue