Skip to content

Conversation

@bart-degreed
Copy link
Contributor

Fixes #815.

The original code looked at the first operator and would, unless that operator was 'in' or 'nin', split the query string parameter value on comma.

This never worked correctly in composition, because the syntax becomes ambiguous.
For example: ?filter[name]=like:a,in:b,c,d could mean:

  • like(a), in(b,c,d)
  • like(a), in(b,c), equals(d)

So while this fix addresses the simple case, it still fails on combinations, including mixing with the new notation.

The original code looked at the first operator and would, unless that operator was 'in' or 'nin', split the query string parameter value on comma.

This never worked correctly in composition, because the syntax becomes ambiguous.
For example: `?filter[name]=like:a,in:b,c,d` could mean:
- like(a), in(b,c,d)
- like(a), in(b,c), equals(d)

So while this fix addresses the simple case, it still fails on combinations, including mixing with the new notation.
@bart-degreed bart-degreed requested a review from maurei September 14, 2020 09:57
@maurei maurei merged commit 0654b42 into json-api-dotnet:master Sep 15, 2020
@bart-degreed bart-degreed deleted the legacy-filters-fix branch September 15, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Invalid parsing of legacy query strings

2 participants