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 authored and droidmonkey committed Dec 28, 2019
1 parent 8459a21 commit 3ffeab4
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 @@ -242,6 +242,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 3ffeab4

Please sign in to comment.