Skip to content

Commit

Permalink
FdoSecrets: fix all exposed entries are returned if search with empty…
Browse files Browse the repository at this point in the history
… terms
  • Loading branch information
Aetf committed Dec 17, 2019
1 parent 8e76c30 commit f7ac7c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/fdosecrets/objects/Collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ namespace FdoSecrets
terms << attributeToTerm(it.key(), it.value());
}

// empty terms causes EntrySearcher returns everything
if (terms.isEmpty()) {
return QList<Item*>{};
}

QList<Item*> items;
const auto foundEntries = EntrySearcher().search(terms, m_exposedGroup);
items.reserve(foundEntries.size());
Expand Down

0 comments on commit f7ac7c0

Please sign in to comment.