SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

SCIM Parser disregards grouping with parenthesis

Open suraj-2584 opened this issue 6 months ago • 1 comments

Setup:

  • I am using SimpleIdServer.Scim.Parser.SCIMFilterParser to parse filter strings into a SCIM Expression tree.
  • using SimpleIdServer.Scim.Parser
  • var filter = ( username eq 'suraj' ) and (( id eq 123 ) or ( id eq 456 ))
  • SCIMFilterParser.Parse(filter)

Expected:

  • ( id eq 123 ) or ( id eq 456 ) will be evaluated first, followed by a AND with ( username eq 'suraj' )
  • SCIM Expression tree :
            AND
           /    \
  userName eq    OR
    'Suraj'     /    \
            id eq   id eq
             123     456

Actual:

  • ( username eq 'suraj' ) and ( id eq 123 ) is evaluated first followed by a OR with ( id eq 456 )

  • Resulting SCIM Expression tree :

              OR
            /    \
        AND       id eq
       /    \       456
username eq  id eq
   'Suraj'     123

suraj-2584 avatar Aug 08 '25 06:08 suraj-2584

Indeed, there is an issue with the parsing. The issue has been fixed in the branch release/v6.0.4.

Kind regards, SID

simpleidserver avatar Aug 09 '25 18:08 simpleidserver