mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-27 00:35:27 -04:00
Add option to use entry only for HTTP Basic Auth
This commit is contained in:
parent
7f262a1210
commit
c0796d8fb1
7 changed files with 43 additions and 10 deletions
|
@ -54,6 +54,7 @@ static const QString KEEPASSHTTP_GROUP_NAME = QStringLiteral("KeePassHttp Passwo
|
|||
// Extra entry related options saved in custom data
|
||||
const QString BrowserService::OPTION_SKIP_AUTO_SUBMIT = QStringLiteral("BrowserSkipAutoSubmit");
|
||||
const QString BrowserService::OPTION_HIDE_ENTRY = QStringLiteral("BrowserHideEntry");
|
||||
const QString BrowserService::OPTION_ONLY_HTTP_AUTH = QStringLiteral("BrowserOnlyHttpAuth");
|
||||
// Multiple URL's
|
||||
const QString BrowserService::ADDITIONAL_URL = QStringLiteral("KP2A_URL");
|
||||
|
||||
|
@ -382,7 +383,12 @@ QJsonArray BrowserService::findMatchingEntries(const QString& id,
|
|||
QList<Entry*> pwEntries;
|
||||
for (auto* entry : searchEntries(url, submitUrl, keyList)) {
|
||||
if (entry->customData()->contains(BrowserService::OPTION_HIDE_ENTRY)
|
||||
&& entry->customData()->value(BrowserService::OPTION_HIDE_ENTRY) == "true") {
|
||||
&& entry->customData()->value(BrowserService::OPTION_HIDE_ENTRY) == TRUE_STR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!httpAuth && entry->customData()->contains(BrowserService::OPTION_ONLY_HTTP_AUTH)
|
||||
&& entry->customData()->value(BrowserService::OPTION_ONLY_HTTP_AUTH) == TRUE_STR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -850,7 +856,7 @@ QJsonObject BrowserService::prepareEntry(const Entry* entry)
|
|||
}
|
||||
|
||||
if (entry->isExpired()) {
|
||||
res["expired"] = "true";
|
||||
res["expired"] = TRUE_STR;
|
||||
}
|
||||
|
||||
if (entry->customData()->contains(BrowserService::OPTION_SKIP_AUTO_SUBMIT)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue