Skip to content

Commit

Permalink
Fixed crash if non-valid filters are specified for notifications/acti…
Browse files Browse the repository at this point in the history
…vities/events
  • Loading branch information
lostystyg committed Aug 24, 2022
1 parent 5732263 commit 876e7b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pocketdb/repositories/web/WebRpcRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4762,6 +4762,10 @@ namespace PocketDb
binds.emplace_back(select.second.binding);
}
}

if (queryElems.empty()) {
throw std::runtime_error("Failed to construct query for requested filters");
}
queryElems.pop_back(); // Dropping last "union"

std::stringstream ss;
Expand Down

0 comments on commit 876e7b5

Please sign in to comment.