SimpleIdServer
SimpleIdServer copied to clipboard
SCIM Parser disregards grouping with parenthesis
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
Indeed, there is an issue with the parsing. The issue has been fixed in the branch release/v6.0.4.
Kind regards, SID