mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[PR #143] fix: bind per-session state to the requesting user in multi-user mode #136
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-terminal/pull/143
Author: @EllaFr
Created: 7/27/2026
Status: 🔄 Open
Base:
main← Head:fix/session-state-user-binding📝 Commits (1)
584efbbfix: bind per-session state to the requesting user in multi-user mode📊 Changes
1 file changed (+31 additions, -15 deletions)
View changed files
📝
open_terminal/main.py(+31 -15)📄 Description
In multi-user mode the file endpoints isolate users through
UserFS, but per-session working-directory state isn't namespaced the same way._session_cwdsis keyed byX-Session-Idalone with no owner, so the same entry is addressed regardless of who sends the request,POST /files/cwdwrites to whatever session id the request names, and its target validation is skipped whenever multi-user mode is active.get_filesystemalso falls back to an unscopedUserFSwhenX-User-Idis absent, which skips per-user path validation entirely.Key
_session_cwdsby(user, session id), taking the user from the server-derivedX-User-Idthe Open WebUI proxy already sends, so a reused session id resolves within the caller's own namespace rather than reaching another user's state.X-User-Idis now required when multi-user mode is enabled instead of silently falling back to an unscoped filesystem, and thePOST /files/cwdtarget is validated in all modes throughUserFS.isdirrather than in single-user mode only. Single-user mode is unchanged.Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.