Skip to content

Require room access on room-scoped resource endpoints - #293

Open
jameshoweee wants to merge 1 commit into
sandbox-quantum:mainfrom
jameshoweee:security/room-resource-access-checks
Open

Require room access on room-scoped resource endpoints#293
jameshoweee wants to merge 1 commit into
sandbox-quantum:mainfrom
jameshoweee:security/room-resource-access-checks

Conversation

@jameshoweee

Copy link
Copy Markdown

The room-scoped document / reference / package / linked-room endpoints authenticated the caller but never checked access to the room, so any authenticated user could read a private room's document content, list its resources, or detach (hard-delete) them by id. IDOR.

Fix: add require_room_access (read for GETs, write for attach/detach) to the document, reference, package, and linked-room room-scoped endpoints, matching the guard the reference-attach / room-link write paths already had. Adds regression tests.

The room-scoped document/reference/package/linked-room endpoints authenticated
the caller but never checked access to the room, so any authenticated user could
read a private room's document content, list its resources, or detach
(hard-delete) them by id (IDOR).

Add require_room_access ("read" for GETs, "write" for attach/detach) to the
document, reference, package, and linked-room room-scoped endpoints, matching
the guard the reference-attach / room-link write paths already had. Adds
regression tests.
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@jameshoweee

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@amaudruz

Copy link
Copy Markdown
Collaborator

recheck

1 similar comment
@jameshoweee

Copy link
Copy Markdown
Author

recheck

@abeldantas abeldantas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants