-
Notifications
You must be signed in to change notification settings - Fork 0
Fix multiuser information leakage in Queue panel detail view #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multiuser information leakage in Queue panel detail view #38
Conversation
- Backend: Update sanitize_queue_item_for_user to clear session graph and workflow - Frontend: Add permission check to disable detail view for unauthorized users - Add test for sanitization logic - Add translation key for permission denied message Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
- Move Graph and GraphExecutionState imports to top of file - Remove dependency on test_nodes in sanitization test - Create minimal test invocation directly in test file Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
- Create shallow copy to avoid mutating original queue_item - Extract 'system' user_id to constant (SYSTEM_USER_ID) - Add constant to both backend and frontend for consistency Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised.
|
@copilot I'm seeing pydantic validation errors in one of the regression tests: |
Add required timestamp fields (created_at, updated_at, started_at, completed_at) to SessionQueueItem in test fixture Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
... Fixed in commit 10a1530. Added the required timestamp fields (created_at, updated_at, started_at, completed_at) to the SessionQueueItem fixture in the test. |
Summary
In multiuser mode, non-admin users could view sensitive generation data (prompts, parameters, graph structure, workflow) from other users' queue items by clicking to expand the detail view. The "Batch Field Values" column correctly censored values, but the expanded detail view exposed the full
sessiongraph andworkflow.Backend: Enhanced
sanitize_queue_item_for_user()to clearsession.graphandworkflowfields for non-admin users viewing other users' items. Creates a shallow copy to prevent mutation side effects.Frontend: Added permission check to disable detail expansion for unauthorized users. Visual feedback includes disabled cursor, reduced opacity, and tooltip. Users can expand only their own items or system items; admins can expand all.
Constants: Extracted
SYSTEM_USER_ID = "system"constant to both backend and frontend for maintainability.Tests: Added comprehensive unit tests with proper fixture setup including all required timestamp fields (
created_at,updated_at,started_at,completed_at) to ensure pydantic validation passes.Related Issues / Discussions
N/A
QA Instructions
Testing requires multiuser mode setup with authentication enabled:
Merge Plan
N/A
Checklist
What's Newcopy (if doing a release after this PR)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.