Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(#274): use the validated token to calculate flags to return This change fixes a bug where the client API would return all flags that existed in the cache, even if the api token did not have access to those flags. Crucially, the API token had to have access to multiple (but not all) projects for this to happen. The root cause is that we used the incoming edge token to check which flags to return. Before it gets validated, its `projects` property is just an empty list. In the filtering, this causes edge to return all available. Features. The solution was to instead use the validated edge token that we create further up. There is also a test that confirms this behavior is what we expect. ## Discussion point Could we make it so that the `with_filter` function can only take validated edge tokens or would that break something else? Might be a good way to future proof it. * fix(#274): update more uses I suspect these will have the same issue * Update server/src/client_api.rs Co-authored-by: Simon Hornby <[email protected]> --------- Co-authored-by: Simon Hornby <[email protected]>
- Loading branch information