mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[PR #175] fix: accept user_id query param on terminal WebSocket ownership check #150
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#150
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/175
Author: @SebastienTolron
Created: 9/17/2026
Status: 🔄 Open
Base:
main← Head:fix/ws-user-id-query-fallback📝 Commits (1)
ec609a3fix: accept user_id query param on terminal WebSocket ownership check📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
open_terminal/main.py(+3 -1)📄 Description
Fixes #169.
The ownership check added in
f0edc9ereads the user only from theX-User-Idheader. Open WebUI ≤ 0.11.3 sends it as?user_id=on the WebSocket handshake and never as a header, so every terminal closes with4004 Session not found.This falls back to the query param when the header is absent. The header still wins when present; a mismatching or missing identity is still rejected.
Tested against a running server: 0.11.3-style handshake (query only) now attaches; header-style handshake still works; wrong user in query, wrong user in header with the victim's id in query, and no identity at all are all still closed with 4004.
Disclosure: this fix was written and tested with the help of Claude Fable 5.1 (via Claude Code). I reviewed the diff and the test results before submitting.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.