Skip to content

fix: Batch and direct access requests fail for object IDs without alphanumeric characters or class names without letters - #10761

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/batch-route-param-parsing
Oct 7, 2026
Merged

mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/batch-route-param-parsing

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Issue

Batch and direct access requests fail for object IDs without alphanumeric characters or class names without letters

Tasks

  • Add tests

Summary by CodeRabbit

  • Bug Fixes
    • Fixed REST and batch requests for object IDs containing punctuation or spaces, including -, _, and ~. These IDs can now be used to retrieve, update, and delete objects.
    • Requests for nonexistent objects now return consistent not-found errors, without triggering save hooks or changing existing objects.

…hanumeric characters or class names without letters
@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: cba1525c-3600-444a-b6de-6c71d1dd6057
📥 Commits

Reviewing files that changed from the base of the PR and between f907c03 and 662f644.

📒 Files selected for processing (4)
  • spec/ParseServerRESTController.spec.js
  • spec/PromiseRouter.spec.js
  • spec/batch.spec.js
  • src/PromiseRouter.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

PromiseRouter.match now returns parsed route parameters without validating their values. Tests cover decoded parameters, custom object IDs, and batch requests involving IDs and class names without alphanumeric characters.

Changes

Route Parameter Handling

Layer / File(s) Summary
Return parsed route parameters
src/PromiseRouter.js
PromiseRouter.match returns layer.params directly. It no longer validates className and objectId values or replaces values that fail the former checks with undefined.
Test route parameters and REST behavior
spec/PromiseRouter.spec.js, spec/ParseServerRESTController.spec.js, spec/batch.spec.js
Tests cover decoded route parameters, retrieval of a custom object with ID -, and batch behavior for IDs and class names without alphanumeric characters. MongoDB-specific tests check missing-ID GET and PUT behavior with ignoreUndefined: true.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~15 minutes

Merge Risk: ⚪ Minimal · up to 662f6

The change appears ready to merge after normal checks; no actionable merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title begins with the permitted fix: prefix and clearly describes the changes. The first letter after the prefix is capitalized.
Description check ✅ Passed The description includes the required issue and confirms that tests were added. The ## Approach section is missing, but the description is otherwise sufficiently complete and relevant.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed No security vulnerability is introduced by the changed code. PromiseRouter.match now forwards the decoded route strings instead of replacing non-alphanumeric values with undefined. The change only…
Engage In Review Feedback ✅ Passed PASS: The supplied review metadata reports zero actionable findings and no CodeRabbit review threads. No review feedback required engagement, implementation, or discussion.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.98%. Comparing base (866e82b) to head (662f644).
⚠️ Report is 1 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha   #10761      +/-   ##
==========================================
- Coverage   93.99%   93.98%   -0.01%     
==========================================
  Files         193      193              
  Lines       17098    17088      -10     
  Branches      259      259              
==========================================
- Hits        16071    16061      -10     
  Misses       1005     1005              
  Partials       22       22              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mtrezza
mtrezza merged commit c8d5ebb into parse-community:alpha Oct 7, 2026
42 of 43 checks passed
parseplatformorg pushed a commit that referenced this pull request Oct 7, 2026
## [9.10.4-alpha.2](9.10.4-alpha.1...9.10.4-alpha.2) (2026-10-07)

### Bug Fixes

* Batch and direct access requests fail for object IDs without alphanumeric characters or class names without letters ([#10761](#10761)) ([c8d5ebb](c8d5ebb))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.4-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 7, 2026
@mtrezza
mtrezza deleted the fix/batch-route-param-parsing branch October 7, 2026 19:02
parseplatformorg pushed a commit that referenced this pull request Oct 9, 2026
## [9.10.4](9.10.3...9.10.4) (2026-10-09)

### Bug Fixes

* Batch and direct access requests fail for object IDs without alphanumeric characters or class names without letters ([#10761](#10761)) ([c8d5ebb](c8d5ebb))
* GraphQL API fails when a class name or mutation alias collides with a built-in name ([#10757](#10757)) ([866e82b](866e82b))
* Object write with a reserved field name can make reads fail on MongoDB ([GHSA-gwrq-q25v-g8mr](GHSA-gwrq-q25v-g8mr)) ([#10763](#10763)) ([d90b841](d90b841))
* Unauthenticated deletion of class schemas removes class-level permissions on MongoDB ([GHSA-qmg9-m772-5rm7](GHSA-qmg9-m772-5rm7)) ([#10767](#10767)) ([2114fca](2114fca))
@parseplatformorg

Copy link
Copy Markdown
Contributor

🎉 This change has been released in version 9.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants