simpleidserver / SimpleIdServer

OpenID, OAuth 2.0, SCIM2.0, UMA2.0, FAPI, CIBA & OPENBANKING Framework for ASP.NET Core
https://simpleidserver.com/
Apache License 2.0
682 stars 90 forks source link

Fix null reference exception upon filter parsing #737

Closed z4kn4fein closed 2 months ago

z4kn4fein commented 2 months ago

Hello there!

I've encountered an issue with the filter parser. Namely, it threw a NullReferenceException when I tried to parse an expression similar to the following: (userName eq "bjensen") and emails[type eq "work" and value co "example.org"] and phoneNumbers[primary eq "true"]

I tracked the exception down and noticed that the Clone() method of the SCIMComplexAttributeExpression did not properly clone the object. I fixed it in this PR and added a test case that covers the fix.