mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Merge pull request #1072 from frostasm/add-support-for-placeholders-on-keepasshttp-custom-fields
Add support for placeholders on the KeePassHTTP custom fields (#1067)
This commit is contained in:
commit
5718f3dca2
@ -259,13 +259,16 @@ Service::Access Service::checkAccess(const Entry *entry, const QString & host, c
|
||||
|
||||
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()) {
|
||||
const EntryAttributes * attr = entry->attributes();
|
||||
const auto keys = attr->keys();
|
||||
for (const QString& key: keys) {
|
||||
if (key.startsWith(QLatin1String("KPH: "))) {
|
||||
res.addStringField(key, attr->value(key));
|
||||
res.addStringField(key, entry->resolveMultiplePlaceholders(attr->value(key)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user