mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-01 09:22:44 -05:00
A trailing space in the Open Terminal bearer token broke only the interactive terminal: HTTP calls put the token in the Authorization header, where the spec strips trailing whitespace, so the connection test, file listing and tool calls all worked. The terminal WebSocket can't set headers from the browser, so it sends the token inside a JSON auth message that preserves the space verbatim, failing auth with [Connection closed]. Normalize the key on save so whitespace never enters storage, and trim it in the WebSocket auth message so existing saved configs work without re-saving. Fixes #25613 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>