Skip to content

fix: Installation update rejects a changed device type or installation ID before checking the caller's write permission - #10847

Merged
mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/installation-update-checks-before-authorization
Oct 30, 2026
Merged

mtrezza merged 1 commit into
parse-community:alphafrom
mtrezza:fix/installation-update-checks-before-authorization

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Issue

An update of an installation addressed by object ID rejects a changed deviceType, installationId or deviceToken before the write permission of the caller is checked. For a caller who may not write the installation, the answer therefore differs from the answer of the write itself.

Tasks

  • Add tests

Summary by CodeRabbit

  • Bug Fixes
    • Installation updates now check write access before returning validation errors.
    • Callers without write access receive the same not-found response as callers addressing an unavailable installation, including when installation identifiers or device types differ.
    • Updates that fail these checks do not change stored installation data.

…n ID before checking the caller's write permission
@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 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

Installation updates now check write access before returning validation errors. Added tests compare responses across accessible, inaccessible, and unavailable targets, and cover permission rules and immutable fields.

Changes: Installation Update Access Checks

Layer / File(s) Summary
Write-access gate and not-found behavior
src/RestWrite.js, spec/ParseInstallation.spec.js
The update path checks write access before returning validation errors. Tests compare responses for installation identifiers, device types, and unavailable targets.
Permission and validation outcomes
spec/ParseInstallation.spec.js
Tests cover class-level and pointer permissions, authentication, validation errors, owner updates, and immutable installation fields.

Priority: Normal

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

Merge Risk: Minimal · up to 01aad

The changed installation-update path has no identified merge-blocking issue. The new tests have not been executed.

Pre-merge checks: Passed 7
Check name Status Explanation
Title check Passed The title begins with the required fix: prefix, uses a capitalized first letter after the prefix, and clearly describes the installation permission-checking change.
Description check Passed The description includes the required Pull Request, Issue, and Tasks sections and explains the security-related behavior. It omits the Approach section, but the description is otherwise mostly complet…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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. The changed installation path performs an ACL-aware validate-only update check before returning immutable-field errors (src/RestWrite.js:1498-1518, 1591-1597).…
Engage In Review Feedback Passed No review feedback required engagement. The supplied current-review result reports zero actionable findings, and no posted CodeRabbit review threads were returned.
Full details: Description check

Explanation

The description includes the required Pull Request, Issue, and Tasks sections and explains the security-related behavior. It omits the Approach section, but the description is otherwise mostly complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Full details: Security Check

Explanation

No security vulnerability is introduced. The changed installation path performs an ACL-aware validate-only update check before returning immutable-field errors (src/RestWrite.js:1498-1518, 1591-1597). Unauthorized callers therefore continue to the normal permission-controlled write path, while master and maintenance callers retain access. The check also skips installation deduplication when write access is absent. The pull request changes no dependencies or security-sensitive configuration.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · 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 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.19%. Comparing base (3e89f2b) to head (01aadd4).

Files with missing lines Patch % Lines
src/RestWrite.js 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha   #10847      +/-   ##
==========================================
+ Coverage   94.17%   94.19%   +0.01%     
==========================================
  Files         193      193              
  Lines       17379    17395      +16     
  Branches      246      246              
==========================================
+ Hits        16367    16385      +18     
+ Misses        991      989       -2     
  Partials       21       21              

☔ 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 3373ee2 into parse-community:alpha Oct 30, 2026
25 checks passed
parseplatformorg pushed a commit that referenced this pull request Oct 30, 2026
## [9.10.8-alpha.2](9.10.8-alpha.1...9.10.8-alpha.2) (2026-10-30)

### Bug Fixes

* Installation update rejects a changed device type or installation ID before checking the caller's write permission ([#10847](#10847)) ([3373ee2](3373ee2))
@mtrezza
mtrezza deleted the fix/installation-update-checks-before-authorization branch October 30, 2026 00:16
@parseplatformorg

Copy link
Copy Markdown
Contributor

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

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants