Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Error in the SCIM Filter Validation of the /ids/Users Endpoint #2703

Closed
adrianhoelzl-sap opened this issue Feb 1, 2024 · 1 comment · Fixed by #2702
Closed

Comments

@adrianhoelzl-sap
Copy link
Contributor

The /ids/Users endpoint allows passing a SCIM filter as a URL parameter. For validating this filter string, the value is parsed and subsequently traversed recursively, checking each clause for validity.

When handling clauses joined by the operator or or and, we saw that an OR-operator is used for combining the validation result of the left-hand side and the right-hand-side of the expression (see

return checkFilter(filter.getFilterComponents().get(1)) || resultLeftOperand;
).

If the RHS of the expression is valid (i.e., checkFilter returned true for it) while the LHS is invalid (i.e., checkFilter returned false for it), the method will return true for the joined expression.

Instead, the two clauses should be combined by using an AND operator, so that both clauses are required to be valid.

If the current state of the code is however correct, this shall be made clear in the comments of the code.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/186965053

The labels on this github issue will be updated when the story is started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants