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

Fix deep sanitizeQuery #19436

Merged
merged 4 commits into from
Aug 24, 2023
Merged

Conversation

u12206050
Copy link
Contributor

@u12206050 u12206050 commented Aug 15, 2023

Fixes #19435

So instead of sanitising each part of a subquery by itself, this refactor groups the fields starting with _ into a query to be sanitised together and then afterwards all of it is added back to the parsedQuery without the randomness of just taking the first element in the entries array.

@changeset-bot
Copy link

changeset-bot bot commented Aug 15, 2023

🦋 Changeset detected

Latest commit: 0ee31cc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@paescuj paescuj requested review from a team, rijkvanzanten, DanielBiegler and jaads and removed request for a team August 16, 2023 15:21
@jaads jaads self-assigned this Aug 24, 2023
@paescuj
Copy link
Member

paescuj commented Aug 24, 2023

Added a test case which proves that it didn't work correctly before this fix:

@paescuj paescuj merged commit 7de52e6 into directus:main Aug 24, 2023
7 checks passed
@github-actions github-actions bot added this to the Next Release milestone Aug 24, 2023
@jaads jaads removed their assignment Aug 24, 2023
sethkaufee pushed a commit to sethkaufee/directus that referenced this pull request Sep 20, 2023
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sanitizeQuery on deep works/fails by chance
3 participants