Skip to content

Prevent resource_path request data from overriding nesting - #20

Merged
jlsync merged 1 commit into
masterfrom
codex/fix-resource-path-override
Oct 11, 2026
Merged

jlsync merged 1 commit into
masterfrom
codex/fix-resource-path-override

Conversation

@jlsync

@jlsync jlsync commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

A request such as /home/rooms/123.json?resource_path=/rooms could replace the nested path through merged query/body parameters, causing a global lookup instead of the current user's scoped association.

Read resource_path only from request.path_parameters, preserving route-defined aliases, memoization, and the request.path fallback. Add query/body regressions for scoped reads and deletes, alias and memoization coverage, update the legacy override specs, and document the fix in the v5.0.2 changelog.

Validation: bundle exec rspec — 676 examples, 0 failures. Ruby syntax checks and git diff --check passed. The regressions reproduced the bypass before the fix; cross-user reads and deletes now return 404 while legitimate scoped operations succeed.

Trust route-defined resource_path aliases, preserve scoped lookup, and add regression coverage plus the v5.0.2 changelog entry.

Co-authored-by: Codex <noreply@openai.com>
@jlsync
jlsync merged commit 09644dc into master Oct 11, 2026
6 checks passed
@jlsync
jlsync deleted the codex/fix-resource-path-override branch October 11, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant