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

Unexpected exception thrown for valid filter #10

Open
philiprabbett opened this issue Dec 11, 2023 · 0 comments
Open

Unexpected exception thrown for valid filter #10

philiprabbett opened this issue Dec 11, 2023 · 0 comments

Comments

@philiprabbett
Copy link

Using https://scimvalidator.microsoft.com/, a filter request was sent with the following filter which throws an Exception

emails[type eq "work"].value eq "una@sipesbarton.info"

I would assume the above filter is valid however the parser is unable to handle this.

(new Parser(Mode::FILTER()))->parse('emails[type eq "work"].value eq "gerson_nader@strosin.us"')

Request
GET /scim/v2/Users?filter=filter=emails%5Btype%20eq%20%22work%22%5D.value%20eq%20%22gerson_nader%40strosin.us%22

Exception

[Tmilos\ScimFilterParser\Error\FilterException](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Error/FilterException.php#L14) {#3097 ▼
    #message: "[Syntax Error] line 0, col 22: Error: Expected end of input, got '.'"
    #code: 0
    #file: "[/REDACTED/vendor/tmilos/scim-filter-parser/src/Error/FilterException.php](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Error/FilterException.php#L24)"
    #line: 24
    -previous: Tmilos\ScimFilterParser\Error\FilterException {#3104 …}
    trace: {▼
      [/REDACTED/vendor/tmilos/scim-filter-parser/src/Error/FilterException.php:24](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Error/FilterException.php#L24) {▶}
      [/REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php:407](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php#L407) {▶}
      [/REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php:379](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php#L379) {▶}
      [/REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php:97](file:///REDACTED/vendor/tmilos/scim-filter-parser/src/Parser.php#L97) {▶}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant