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

parser does not decode query string before validating #4

Closed
numerical25 opened this issue Feb 10, 2019 · 1 comment
Closed

parser does not decode query string before validating #4

numerical25 opened this issue Feb 10, 2019 · 1 comment

Comments

@numerical25
Copy link

numerical25 commented Feb 10, 2019

JSON API Custom Query does not decode urls before it evaluates them. Some API Testing Applicattions such as Postman encode the url's before sending them out. Is it possible to have a fix for this ?

When using applications such as Postman, urls turn from this...

filter=(:or,(:and,(events.end_date,:gte,1549745450224),(events.start_date,:lte,1549745450224)))

into this...

filter=%28:or,%28:and,%28events.end_date,:gte,1549745450224%29,%28events.start_date,:lte,1549745450224%29%29%29

The parser trys to validate the url without making an attempt to decode the url and throws an error. A simple decode before evaluating the url should fix this issue.

Please see issue #5 for a proposed change.

@numerical25 numerical25 changed the title parser does not decode query string before evaluating parser does not decode query string before validating Feb 10, 2019
@ethanresnick
Copy link
Owner

See my response on the main json-api repo. But basically, we can't blindly decode the whole string as that will create a lot of broken parses.

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

2 participants