Filter GetAllLogins entries, to return only entries with an URL.

This commit is contained in:
Francois Ferrand 2013-05-01 12:17:12 +02:00
parent 53b30e267c
commit db56546871
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,6 @@ void Server::getAllLogins(const Request &r, Response *protocolResp)
if (!r.CheckVerifier(key)) if (!r.CheckVerifier(key))
return; return;
// parms.SearchString = @"^[A-Za-z0-9:/-]+\.[A-Za-z0-9:/-]+$"; // match anything looking like a domain or url
protocolResp->setSuccess(); protocolResp->setSuccess();
protocolResp->setId(r.id()); protocolResp->setId(r.id());
protocolResp->setVerifier(key); protocolResp->setVerifier(key);

View File

@ -371,7 +371,8 @@ QList<KeepassHttpProtocol::Entry> Service::searchAllEntries(const QString &id)
if (Database * db = dbWidget->database()) if (Database * db = dbWidget->database())
if (Group * rootGroup = db->rootGroup()) if (Group * rootGroup = db->rootGroup())
Q_FOREACH (Entry * entry, rootGroup->entriesRecursive()) 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; return result;
} }