reject unsafe mongo query operators on /o/tasks and /o/slipping (backport 24.05)#7703
Merged
ar2rsawseen merged 2 commits intoJun 10, 2026
Merged
Conversation
Route the slipping-away-users query through common.parseUserQuery so $where/$function/$accumulator are rejected (400). Follow-up to the merged release.24.05 reject-unsafe-query work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Backports the /o/slipping endpoint hardening to release.24.05 by validating the user-supplied MongoDB query at the API boundary (via common.parseUserQuery) and rejecting unsafe operators with a 400, instead of raw-parsing and proceeding.
Changes:
- Parse
/o/slippingqueryusingcommon.parseUserQuery(...)and reject invalid/unsafe queries with400. - Add endpoint-scoped logging for rejected queries using
common.log(...)+common.reqInfo(...).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Cookiezaurs
approved these changes
Jun 10, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of the /o/slipping fix to release.24.05. Routes the slipping-away-users query through
common.parseUserQuery(reject 400) instead of raw-parsing it intoapp_users<app_id>.countconditions. Follow-up to the merged #7696.