-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
catalog-backend: ensure subqueries are isolated from one another
Ensures that independent calls to `parseFilter` are isolated from one another, by always wrapping additional clauses to the query in `andWhere`. I think that the bug in the previous incarnation is strictly theoretical, as long as parseFilters is only called once for a given filter (which today, it is). When authorization lands in catalog-backend though, we'll need to call it multiple times - once to add the authz filters, and once to add the filters requested by the caller, which would expose this bug. Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage/plugin-catalog-backend': patch | ||
--- | ||
|
||
Adjust entity query construction to ensure sub-queries are always isolated from one another. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters