Skip to content

Fix IDOR in Requests and Donations controllers (5509)#5519

Merged
dorner merged 4 commits intorubyforgood:mainfrom
cassxw:5509-idor-requests-donations
Mar 27, 2026
Merged

Fix IDOR in Requests and Donations controllers (5509)#5519
dorner merged 4 commits intorubyforgood:mainfrom
cassxw:5509-idor-requests-donations

Conversation

@cassxw
Copy link
Copy Markdown
Contributor

@cassxw cassxw commented Mar 15, 2026

Partially resolves #5509 (other controller fixes in #5514)

Description

Scopes Requests and Donations lookups to the current organization to prevent cross‑org access (IDOR). Adds request specs for cross‑org 404 behavior and updates the request show spec to use a valid default storage location.

Removes tenant isolation risk for Requests and Donations lookups.

Tradeoffs: 404s for cross‑org IDs instead of showing the record.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • bundle exec rspec spec/requests/requests_requests_spec.rb spec/requests/donations_requests_spec.rb - all green.
  • When running the full test suite, experienced some flaky test failures, which I believe are currently being sorted out in Fix flaky tests #5516.

@dorner
Copy link
Copy Markdown
Collaborator

dorner commented Mar 20, 2026

@cassxw it looks good but is failing lint. Can you fix please?

@cassxw cassxw requested a review from dorner March 23, 2026 19:14
@dorner dorner merged commit b8f7873 into rubyforgood:main Mar 27, 2026
11 checks passed
@dorner
Copy link
Copy Markdown
Collaborator

dorner commented Mar 27, 2026

Thank you!

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.

Security: Cross-organization IDOR in 5 controllers (Requests, Donations, Kits, Announcements, Distributions)

2 participants