From 2027429d879b9af5bcd8f1a60cd70431077e7e76 Mon Sep 17 00:00:00 2001 From: frostasm Date: Sun, 15 Oct 2017 12:49:41 +0300 Subject: [PATCH] Add support for placeholders on the KeePassHTTP custom fields --- src/http/Service.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/http/Service.cpp b/src/http/Service.cpp index 768a5774d..e68a7bfd9 100644 --- a/src/http/Service.cpp +++ b/src/http/Service.cpp @@ -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))); } } }