-
Notifications
You must be signed in to change notification settings - Fork 422
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
Keys with special characters can't be referenced in filters #3485
Comments
Indeed! How do you think we could solve this? Using quotes I guess? |
There seem to be a few options:
Edit: For what it's worth, I don't have a particularly strong preference. I think the first one is probably the most intuitive though. Footnotes
|
Thanks for the reference 👌 If we can't have both, I think I would prefer if we would follow a IETF standard. The code that handles the querystring filters is here: kinto/kinto/core/resource/__init__.py Line 1108 in 80f4315
And filters are then implemented in each storage down the line: kinto/kinto/core/storage/memory.py Line 511 in 5ea7d60
kinto/kinto/core/storage/postgresql/__init__.py Lines 785 to 787 in 1c23559
With tests for both: kinto/tests/core/resource/test_filter.py Lines 251 to 261 in bf94438
kinto/kinto/core/storage/testing.py Lines 710 to 722 in 1c23559
Would you like to try a contribution? |
If an object key contains special characters (e.g.
-
or.
), it can't be filtered on even though it's a valid JSON object key.For example,
?has_stuff.foo-bar=true
can't be used to check if "foo-bar" is a field of "stuff". There doesn't seem to be any way to escape special characters either.The text was updated successfully, but these errors were encountered: