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

ids not being escaped in paths in the Simple Rest Data Provider #10207

Closed
ckhsponge opened this issue Sep 16, 2024 · 0 comments · Fixed by #10206
Closed

ids not being escaped in paths in the Simple Rest Data Provider #10207

ckhsponge opened this issue Sep 16, 2024 · 0 comments · Fixed by #10206

Comments

@ckhsponge
Copy link
Contributor

What you were expecting:
Records may have ids with characters that break the Simple REST Data Provider paths if not escaped.
For example, a record with id "Post#123" has a getOne path of '/posts/Post#123' which is not desired.
IDs like this can occur when using single table inheritance with DynamoDB or with other document data stores.
The solution is to escape IDs in paths for getOne, update, updateMany, delete and deleteMany. An example path with escaped id is '/posts/Post%23123'.

What happened instead:
A record with id "Post#123" has a getOne path of '/posts/Post#123' which is not desired.

Steps to reproduce:
Use a record with id 'Post#123' and perform anything that does a getOne operation.

Related code:
Here is a PR with a fix:
10206

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

Successfully merging a pull request may close this issue.

1 participant