parse-community / parse-community/parse-server
Allow `Parse.Query.includeAll` when `maxIncludeQueryComplexity` is set
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Current Limitation
https://github.com/parse-community/parse-server/pull/9920 was merged with the understanding that its limitation of disabling the feature of Parse.Query.includeAll when maxIncludeQueryComplexity is set is an unnecessary restriction.
Since maxIncludeQueryComplexity is a security feature, which is considered to be enabled by default, it equates to removing the practical usability of the Parse.Query.includeAll feature.
Feature / Enhancement Description
Allow Parse.Query.includeAll when maxIncludeQueryComplexity is set.
The restriction for includeAll should rather be:
- if max depth < 1 AND includeAll is used AND the schema contains a pointer field -> deny with invalid query
Or simpler, because why would someone use includeAll on a schema without pointers:
- if max depth < 1 and includeAll is used -> deny with invalid query
The option also adds a field count limit, so when using includeAll on a class with n pointer fields, and the count limit is < n then there should also be an invalid query response. This may be easy to implement as the schema is known and we can compare the pointer field count early in the process.
See discussion in https://github.com/parse-community/parse-server/pull/9920#discussion_r2540948092.
Alternatives / Workarounds
Refactor developer app code to not use Parse.Query.includeAll.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #9920 and the linked discussion, then trace how Parse.Query.includeAll is handled with maxIncludeQueryComplexity. Clarify whether the depth rule, pointer-field count rule, or both are required. Done means supported includeAll queries return normally within the limits and invalid queries are rejected when those limits are exceeded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100