From db5654687104d8ccb30c286a6054814958dabf53 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 1 May 2013 12:17:12 +0200 Subject: [PATCH] Filter GetAllLogins entries, to return only entries with an URL. --- src/http/Server.cpp | 1 - src/http/Service.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http/Server.cpp b/src/http/Server.cpp index 9104ba0b6..9725e56f3 100644 --- a/src/http/Server.cpp +++ b/src/http/Server.cpp @@ -179,7 +179,6 @@ void Server::getAllLogins(const Request &r, Response *protocolResp) if (!r.CheckVerifier(key)) return; -// parms.SearchString = @"^[A-Za-z0-9:/-]+\.[A-Za-z0-9:/-]+$"; // match anything looking like a domain or url protocolResp->setSuccess(); protocolResp->setId(r.id()); protocolResp->setVerifier(key); diff --git a/src/http/Service.cpp b/src/http/Service.cpp index 9cb52b9c9..85551fa91 100644 --- a/src/http/Service.cpp +++ b/src/http/Service.cpp @@ -371,7 +371,8 @@ QList Service::searchAllEntries(const QString &id) if (Database * db = dbWidget->database()) if (Group * rootGroup = db->rootGroup()) Q_FOREACH (Entry * entry, rootGroup->entriesRecursive()) - result << KeepassHttpProtocol::Entry(entry->title(), entry->username(), QString(), entry->uuid().toHex()); + if (!entry->url().isEmpty() || QUrl(entry->title()).isValid()) + result << KeepassHttpProtocol::Entry(entry->title(), entry->username(), QString(), entry->uuid().toHex()); return result; }